Skip to content

Commit

Permalink
Fix netbsd
Browse files Browse the repository at this point in the history
  • Loading branch information
eleanor-clifford committed Oct 2, 2024
1 parent cd95bb7 commit 3aa7557
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions libusb1-sys/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -148,6 +148,11 @@ fn make_source() {
base_config.file(libusb_source.join("libusb/os/linux_usbfs.c"));
}

if std::env::var("CARGO_CFG_TARGET_OS") == Ok("netbsd".into())
{
base_config.file(libusb_source.join("libusb/os/netbsd_usb.c"));
}

if std::env::var("CARGO_CFG_TARGET_FAMILY") == Ok("unix".into()) {
base_config.define("HAVE_SYS_TIME_H", Some("1"));
base_config.define("HAVE_NFDS_T", Some("1"));
Expand Down

0 comments on commit 3aa7557

Please sign in to comment.