Merge pull request #1628 from tomberek/alienfx_libusb

Add #include <unisted.h> for sleep and usleep
This commit is contained in:
Domen Kožar 2014-01-29 08:57:20 -08:00
commit aa595f3cf1
2 changed files with 14 additions and 1 deletions

View File

@ -14,11 +14,12 @@ stdenv.mkDerivation {
sha256 = "47501a3b4e08d39edee4cd829ae24259a7e740b9798db76b846fa872989f8fb1";
};
patchPhase = ''
prePatch = ''
substituteInPlace Makefile --replace /usr/ $out/
substituteInPlace Makefile --replace "install -o root -g root" "install"
'';
patches = [./unistd.patch];
buildInputs = [ libusb1 ];
makeFlags = "build";
preInstall = ''

View File

@ -0,0 +1,12 @@
diff --git a/alienfx.cpp b/alienfx.cpp
index 5981039..aea8992 100644
--- a/alienfx.cpp
+++ b/alienfx.cpp
@@ -13,6 +13,7 @@
#include <string.h>
#include <iostream>
#include <libusb-1.0/libusb.h>
+#include <unistd.h>
using namespace std;