perl-sys-cpu: fix build failures due to <sys/unistd.h>
authorChristopher McCrory <chrismcc@gmail.com>
Thu, 27 Sep 2018 14:46:46 +0000 (07:46 -0700)
committerThomas Petazzoni <thomas.petazzoni@bootlin.com>
Mon, 8 Oct 2018 19:55:27 +0000 (21:55 +0200)
This commit adds a patch that drops an unneeded <sys/unistd.h>
include, as it causes build failures on uClibc/musl.

Fixes:

  http://autobuild.buildroot.net/results/a87116b34ee0c660537430638e38f7ebbf052024/

Signed-off-by: Christopher McCrory <chrismcc@gmail.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
package/perl-sys-cpu/0001-remove-extraneous-include.patch [new file with mode: 0644]

diff --git a/package/perl-sys-cpu/0001-remove-extraneous-include.patch b/package/perl-sys-cpu/0001-remove-extraneous-include.patch
new file mode 100644 (file)
index 0000000..eb7d8f7
--- /dev/null
@@ -0,0 +1,20 @@
+Drop <sys/unistd.h> include
+
+<sys/unistd.h> does not exist in musl or uClibc, so including it
+causes a build failure. In glibc, it simply redirects to <unistd.h>,
+so we can safely drop the inclusion of <sys/unistd.h>
+
+Signed-off-by: Christopher McCrory <chrismcc@gmail.com>
+
+Index: b/CPU.xs
+===================================================================
+--- a/CPU.xs
++++ b/CPU.xs
+@@ -24,7 +24,6 @@
+  #include <winreg.h>\r
+ #else                /* other (try unix) */\r
+  #include <unistd.h>\r
+- #include <sys/unistd.h>\r
+ #endif\r
+ #if defined(__sun) || defined(__sun__) \r
+  #include <sys/processor.h>\r