net-snmp: Fix build issue found with musl
PATCH 1/3 net-snmp: Fix build issue found with musl
limits.h is needed for PATH_MAX and NAME_MAX
Signed-off-by Khem Raj <[email protected]>
--- .../0001-get_pid_from_inode-Include-limit.h.patch | 29 +++++++++++++++++++ .../recipes-protocols/net-snmp/net-snmp_5.7.3.bb | 33 +++++++++++----------- 2 files changed, 46 insertions(+), 16 deletions(-) create mode 100644 meta-networking/recipes-protocols/net-snmp/net-snmp/0001-get_pid_from_inode-Include-limit.h.patch
meta-networking/recipes-protocols/net-snmp/net-snmp/0001-get_pid_from_inode-Include-limit.h.patch new file +29 -0
@@ -0,0 +1,29 @@ +From 7136d593ba96b64537069637c328bc65e1b66b2d Mon Sep 17 00:00:00 2001 +From: Khem Raj <[email protected]> +Date: Fri, 22 Jul 2016 18:34:39 +0000 +Subject: [PATCH] get_pid_from_inode: Include limit.h + +PATH_MAX and NAME_MAX are required by this file + +Signed-off-by: Khem Raj <[email protected]> +--- +Upstream-Status: Pending + + agent/mibgroup/util_funcs/get_pid_from_inode.c | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/agent/mibgroup/util_funcs/get_pid_from_inode.c b/agent/mibgroup/util_funcs/get_pid_from_inode.c +index 8e157ae..a494ec7 100644 +--- a/agent/mibgroup/util_funcs/get_pid_from_inode.c ++++ b/agent/mibgroup/util_funcs/get_pid_from_inode.c +@@ -5,6 +5,7 @@ + #include <net-snmp/output_api.h> + + #include <ctype.h> ++#include <limits.h> + #include <stdio.h> + #if HAVE_STDLIB_H + #include <stdlib.h> +-- +1.8.3.1 +
meta-networking/recipes-protocols/net-snmp/net-snmp_5.7.3.bb +17 -16
@@ -8,22 +8,23 @@ LIC_FILES_CHKSUM = "file://README;beginline=3;endline=8;md5=7f7f00ba639ac8e8deb5 DEPENDS = "openssl libnl pciutils" SRC_URI = "${SOURCEFORGE_MIRROR}/net-snmp/net-snmp-${PV}.zip \ - file://init \ - file://snmpd.conf \ - file://snmptrapd.conf \ - file://systemd-support.patch \ - file://snmpd.service \ - file://snmptrapd.service \ - file://net-snmp-add-knob-whether-nlist.h-are-checked.patch \ - file://fix-libtool-finish.patch \ - file://net-snmp-testing-add-the-output-format-for-ptest.patch \ - file://run-ptest \ - file://dont-return-incompletely-parsed-varbinds.patch \ - file://0001-config_os_headers-Error-Fix.patch \ - file://0001-config_os_libs2-Error-Fix.patch \ - file://0001-snmplib-keytools.c-Don-t-check-for-return-from-EVP_M.patch \ - file://net-snmp-agentx-crash.patch \ -" + file://init \ + file://snmpd.conf \ + file://snmptrapd.conf \ + file://systemd-support.patch \ + file://snmpd.service \ + file://snmptrapd.service \ + file://net-snmp-add-knob-whether-nlist.h-are-checked.patch \ + file://fix-libtool-finish.patch \ + file://net-snmp-testing-add-the-output-format-for-ptest.patch \ + file://run-ptest \ + file://dont-return-incompletely-parsed-varbinds.patch \ + file://0001-config_os_headers-Error-Fix.patch \ + file://0001-config_os_libs2-Error-Fix.patch \ + file://0001-snmplib-keytools.c-Don-t-check-for-return-from-EVP_M.patch \ + file://net-snmp-agentx-crash.patch \ + file://0001-get_pid_from_inode-Include-limit.h.patch \ + " SRC_URI[md5sum] = "9f682bd70c717efdd9f15b686d07baee" SRC_URI[sha256sum] = "e8dfc79b6539b71a6ff335746ce63d2da2239062ad41872fff4354cafed07a3e"
Signature · 1 line
2.9.3
PATCH 2/3 gpsd: Fix build with musl
Signed-off-by Khem Raj <[email protected]>
--- .../gpsd-3.14/0001-include-sys-ttydefaults.h.patch | 34 ++++++++++++++++++++++ meta-oe/recipes-navigation/gpsd/gpsd_3.14.bb | 1 + 2 files changed, 35 insertions(+) create mode 100644 meta-oe/recipes-navigation/gpsd/gpsd-3.14/0001-include-sys-ttydefaults.h.patch
meta-oe/recipes-navigation/gpsd/gpsd-3.14/0001-include-sys-ttydefaults.h.patch new file +34 -0
@@ -0,0 +1,34 @@ +From 543f79222520cc6ab65d20f9fa356dac5c848e3b Mon Sep 17 00:00:00 2001 +From: Khem Raj <[email protected]> +Date: Wed, 17 Aug 2016 02:16:12 +0000 +Subject: [PATCH] include sys/ttydefaults.h + +This is needed for CTRL definition, as exposed by musl on glibc +this include file gets pulled indirectly. + +/usr/src/debug/gpsd/3.14-r0/gpsd-3.14/gpsmon.c:605: undefined reference to `CTRL' +clang-3.9: error: linker command failed with exit code 1 (use -v to see invocation) +scons: *** [gpsmon] Error 1 + +Signed-off-by: Khem Raj <[email protected]> +--- +Upstream-Status: Pending + + gpsmon.c | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/gpsmon.c b/gpsmon.c +index bee05b8..daed818 100644 +--- a/gpsmon.c ++++ b/gpsmon.c +@@ -20,6 +20,7 @@ + #include <sys/types.h> + #include <sys/stat.h> + #include <sys/select.h> ++#include <sys/ttydefaults.h> + #include <fcntl.h> + #ifndef S_SPLINT_S + #include <unistd.h> +-- +1.8.3.1 +
meta-oe/recipes-navigation/gpsd/gpsd_3.14.bb +1 -0
@@ -17,6 +17,7 @@ SRC_URI = "${SAVANNAH_GNU_MIRROR}/${BPN}/${BP}.tar.gz \ file://0003-Whoops-check-for-C11-not-for-not-C11-in-stdatomic.h-.patch \ file://0001-Include-stdatomic.h-only-in-C-mode.patch \ file://0001-libgpsd-core-Fix-issue-with-ACTIVATE-hook-not-being-.patch \ + file://0001-include-sys-ttydefaults.h.patch \ file://gpsd-default \ file://gpsd \ file://60-gpsd.rules \
Signature · 1 line
2.9.3
PATCH 3/3 lirc: Fix build with clang
In reply to Khem RajSigned-off-by Khem Raj <[email protected]>
--- ...crcd-Mark-local-inline-funtions-as-static.patch | 49 ++++++++++++++++++++++ meta-oe/recipes-connectivity/lirc/lirc_0.9.2.bb | 1 + 2 files changed, 50 insertions(+) create mode 100644 meta-oe/recipes-connectivity/lirc/lirc/0001-lircrcd-Mark-local-inline-funtions-as-static.patch
meta-oe/recipes-connectivity/lirc/lirc/0001-lircrcd-Mark-local-inline-funtions-as-static.patch new file +49 -0
@@ -0,0 +1,49 @@ +From c2be4543e4777c9e3d74b30326ba37b01917b0a9 Mon Sep 17 00:00:00 2001 +From: Khem Raj <[email protected]> +Date: Thu, 25 Aug 2016 03:02:37 +0000 +Subject: [PATCH] lircrcd: Mark local inline funtions as static + +These functions are not used anywhere outside +this file, so they should be converted into static + +Signed-off-by: Khem Raj <[email protected]> +--- +Upstream-Status: Pending + + daemons/lircrcd.c | 6 +++--- + 1 file changed, 3 insertions(+), 3 deletions(-) + +diff --git a/daemons/lircrcd.c b/daemons/lircrcd.c +index 55777cd..5ddc94d 100644 +--- a/daemons/lircrcd.c ++++ b/daemons/lircrcd.c +@@ -153,7 +153,7 @@ char *s; + /* A safer write(), since sockets might not write all but only some of the + bytes requested */ + +-inline int write_socket(int fd, char *buf, int len) ++static inline int write_socket(int fd, char *buf, int len) + { + int done, todo = len; + +@@ -167,7 +167,7 @@ inline int write_socket(int fd, char *buf, int len) + return (len); + } + +-inline int write_socket_len(int fd, char *buf) ++static inline int write_socket_len(int fd, char *buf) + { + int len; + +@@ -177,7 +177,7 @@ inline int write_socket_len(int fd, char *buf) + return (1); + } + +-inline int read_timeout(int fd, char *buf, int len, int timeout) ++static inline int read_timeout(int fd, char *buf, int len, int timeout) + { + fd_set fds; + struct timeval tv; +-- +1.9.1 +
meta-oe/recipes-connectivity/lirc/lirc_0.9.2.bb +1 -0
@@ -1,6 +1,7 @@ require lirc.inc SRC_URI += " \ + file://0001-lircrcd-Mark-local-inline-funtions-as-static.patch \ file://lircd.service \ file://lircd.init \ file://lircexec.init \
Signature · 1 line
2.9.3