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 3, 2024
1 parent cd95bb7 commit 1fe5006
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions libusb1-sys/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -148,6 +148,10 @@ 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 1fe5006

Please sign in to comment.