package/lua-lunix: fix sys/sysctl.h detection
authorFrancois Perrad <fperrad@gmail.com>
Sat, 21 Aug 2021 07:24:12 +0000 (09:24 +0200)
committerArnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
Mon, 23 Aug 2021 21:12:57 +0000 (23:12 +0200)
sysctl.h has been removed from glibc since version 2.32.

Fixes: http://autobuild.buildroot.net/results/749a11d5289c6fec3b2f236b9073fc1ab730d090/
Signed-off-by: Francois Perrad <francois.perrad@gadz.org>
Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
package/lua-lunix/0003-fix-sysctl-detection.patch [new file with mode: 0644]

diff --git a/package/lua-lunix/0003-fix-sysctl-detection.patch b/package/lua-lunix/0003-fix-sysctl-detection.patch
new file mode 100644 (file)
index 0000000..18656b1
--- /dev/null
@@ -0,0 +1,24 @@
+sys/sysctl.h was removed with glibc 2.32
+
+Fetched from: https://github.com/wahern/lunix/pull/20/files
+Signed-off-by: Francois Perrad <francois.perrad@gadz.org>
+---
+ lunix-rel-20170920/src/unix.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/lunix-rel-20170920/src/unix.c b/lunix-rel-20170920/src/unix.c
+index 272820a..fa00876 100644
+--- a/lunix-rel-20170920/src/unix.c
++++ b/lunix-rel-20170920/src/unix.c
+@@ -165,7 +165,7 @@
+ #endif
+ #ifndef HAVE_SYS_SYSCTL_H /* missing on musl libc */
+-#define HAVE_SYS_SYSCTL_H (defined BSD || GLIBC_PREREQ(0,0) || UCLIBC_PREREQ(0,0,0))
++#define HAVE_SYS_SYSCTL_H (defined BSD || (__GLIBC__ && !GLIBC_PREREQ(2,32)) || UCLIBC_PREREQ(0,0,0))
+ #endif
+ #ifndef HAVE_STRUCT_IN_PKTINFO
+-- 
+2.30.2
+