Add #include <unisted.h> for sleep and usleep

This commit is contained in:
Thomas Bereknyei 2014-01-25 13:46:48 -05:00
parent 29a29c6438
commit c17e6d6968
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;