libusb: fix header usage on musl, patch from Alpine

This commit is contained in:
Will Dietz 2017-10-03 18:04:30 -05:00
parent 29b012e177
commit 77c58c9de1
2 changed files with 12 additions and 0 deletions

View File

@ -14,6 +14,8 @@ stdenv.mkDerivation {
sha256 = "0nn5icrfm9lkhzw1xjvaks9bq3w6mjg86ggv3fn7kgi4nfvg8kj0";
};
patches = stdenv.lib.optional stdenv.hostPlatform.isMusl ./fix-headers.patch;
meta = {
platforms = stdenv.lib.platforms.unix;
};

View File

@ -0,0 +1,10 @@
--- libusb-compat-0.1.5.orig/libusb/usb.h
+++ libusb-compat-0.1.5/libusb/usb.h
@@ -25,6 +25,7 @@
#ifndef __USB_H__
#define __USB_H__
+#include <sys/types.h>
#include <unistd.h>
#include <stdlib.h>
#include <limits.h>