浏览代码

perl-sys-cpu: fix build failures due to <sys/unistd.h>

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>
Christopher McCrory 6 年之前
父节点
当前提交
2cd5d6eea1
共有 1 个文件被更改,包括 20 次插入0 次删除
  1. 20 0
      package/perl-sys-cpu/0001-remove-extraneous-include.patch

+ 20 - 0
package/perl-sys-cpu/0001-remove-extraneous-include.patch

@@ -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>
+ #else                /* other (try unix) */
+  #include <unistd.h>
+- #include <sys/unistd.h>
+ #endif
+ #if defined(__sun) || defined(__sun__) 
+  #include <sys/processor.h>