[Buildroot] [PATCH] package/lua-lunix: fix build with recent gcc

Francois Perrad fperrad at gmail.com
Sun Aug 1 09:57:34 UTC 2021


see http://autobuild.buildroot.net/results/749a11d5289c6fec3b2f236b9073fc1ab730d090/

Signed-off-by: Francois Perrad <francois.perrad at gadz.org>
---
 ...ctl-instead-of-deprecated-sys-sysctl.patch | 31 +++++++++++++++++++
 1 file changed, 31 insertions(+)
 create mode 100644 package/lua-lunix/0003-use-linux-sysctl-instead-of-deprecated-sys-sysctl.patch

diff --git a/package/lua-lunix/0003-use-linux-sysctl-instead-of-deprecated-sys-sysctl.patch b/package/lua-lunix/0003-use-linux-sysctl-instead-of-deprecated-sys-sysctl.patch
new file mode 100644
index 000000000..e2369bdfb
--- /dev/null
+++ b/package/lua-lunix/0003-use-linux-sysctl-instead-of-deprecated-sys-sysctl.patch
@@ -0,0 +1,31 @@
+Fetched from https://github.com/wahern/lunix/pull/18
+
+From 99b02b08d3f1a53e58b558b9f2250225e569a550 Mon Sep 17 00:00:00 2001
+From: Tiago Seco <tiago at seco.ws>
+Date: Sun, 20 Jun 2021 11:20:23 +0200
+Subject: [PATCH] use <linux/sysctl.h> instead of deprectaed <sys/sysctl.h> for
+ linux systems
+
+---
+ lunix-rel-20170920/src/unix.c | 6 +++++-
+ 1 file changed, 5 insertions(+), 1 deletion(-)
+
+diff --git a/lunix-rel-20170920/src/unix.c b/lunix-rel-20170920/src/unix.c
+index bea4d14..dfa26a3 100644
+--- a/lunix-rel-20170920/src/unix.c
++++ b/lunix-rel-20170920/src/unix.c
+@@ -560,7 +560,11 @@
+ #endif
+ 
+ #if HAVE_SYS_SYSCTL_H
+-#include <sys/sysctl.h> /* CTL_KERN KERN_RANDOM RANDOM_UUID sysctl(2) */
++#ifdef __linux__
++#include <linux/sysctl.h> /* CTL_KERN KERN_RANDOM RANDOM_UUID sysctl(2) */
++#else
++#include <sys/sysctl.h>
++#endif
+ #endif
+ 
+ #if HAVE_IFADDRS_H
+-- 
+2.30.2
-- 
2.30.2



More information about the buildroot mailing list