From: Jackie Huang <[email protected]>

Previously, it still was checked when there was no nlish.h in sysroots 
directory.
Add knob to decide whether nlist.h are checked or not.

Fixed by using PACKAGECONFIG to check elf, with default disabled set.

Signed-off-by: Chong Lu <[email protected]>
Signed-off-by: Jackie Huang <[email protected]>
---
 ...snmp-add-knob-whether-nlist.h-are-checked.patch | 35 ++++++++++++++++++++++
 .../recipes-protocols/net-snmp/net-snmp_5.7.2.1.bb |  4 +++
 2 files changed, 39 insertions(+)
 create mode 100644 
meta-networking/recipes-protocols/net-snmp/net-snmp/net-snmp-add-knob-whether-nlist.h-are-checked.patch

diff --git 
a/meta-networking/recipes-protocols/net-snmp/net-snmp/net-snmp-add-knob-whether-nlist.h-are-checked.patch
 
b/meta-networking/recipes-protocols/net-snmp/net-snmp/net-snmp-add-knob-whether-nlist.h-are-checked.patch
new file mode 100644
index 0000000..74b0c12
--- /dev/null
+++ 
b/meta-networking/recipes-protocols/net-snmp/net-snmp/net-snmp-add-knob-whether-nlist.h-are-checked.patch
@@ -0,0 +1,35 @@
+net-snmp: add knob whether nlist.h are checked
+
+Previously, it still was checked when there was no nlish.h in sysroots 
directory.
+Add knob to decide whether nlist.h are checked or not.
+
+Upstream-status: Pending
+
+Signed-off-by: Chong Lu <[email protected]>
+---
+ configure.d/config_os_headers |    2 ++
+ 1 file changed, 2 insertions(+)
+
+diff --git a/configure.d/config_os_headers b/configure.d/config_os_headers
+index d903f58..a05d30e 100644
+--- a/configure.d/config_os_headers
++++ b/configure.d/config_os_headers
+@@ -31,6 +31,7 @@ AC_CHECK_HEADERS([getopt.h   pthread.h  regex.h      ] dnl
+                  [sys/un.h           ])
+ 
+ #  Library and Agent:
++if test "x$with_elf" != "xno"; then
+ AC_CHECK_HEADERS([nlist.h],,,[
+ AC_INCLUDES_DEFAULT
+ [
+@@ -38,6 +39,7 @@ AC_INCLUDES_DEFAULT
+ #define LIBBSD_DISABLE_DEPRECATED 1
+ #endif
+ ]])
++fi
+ 
+ #  Library:
+ AC_CHECK_HEADERS([fcntl.h    io.h       kstat.h                 ] dnl
+-- 
+1.7.9.5
+
diff --git a/meta-networking/recipes-protocols/net-snmp/net-snmp_5.7.2.1.bb 
b/meta-networking/recipes-protocols/net-snmp/net-snmp_5.7.2.1.bb
index 1e398d4..6736718 100644
--- a/meta-networking/recipes-protocols/net-snmp/net-snmp_5.7.2.1.bb
+++ b/meta-networking/recipes-protocols/net-snmp/net-snmp_5.7.2.1.bb
@@ -16,6 +16,7 @@ SRC_URI = "${SOURCEFORGE_MIRROR}/net-snmp/net-snmp-${PV}.zip \
         file://snmptrapd.service \
         file://ifmib.patch \
         file://fix-libtool-finish.patch \
+        file://net-snmp-add-knob-whether-nlist.h-are-checked.patch \
 "
 
 SRC_URI[md5sum] = "a2c83518648b0f2a5d378625e45c0e18"
@@ -41,6 +42,9 @@ EXTRA_OECONF = "--disable-embedded-perl \
 # net-snmp needs to have mib-modules=smux enabled to enable quagga to support 
snmp
 EXTRA_OECONF += "--with-mib-modules=smux"
 
+PACKAGECONFIG ??= ""
+PACKAGECONFIG[elfutils] = "--with-elf, --without-elf, elfutils"
+
 CACHED_CONFIGUREVARS = " \
     ac_cv_header_valgrind_valgrind_h=no \
     ac_cv_header_valgrind_memcheck_h=no \
-- 
1.9.1

-- 
_______________________________________________
Openembedded-devel mailing list
[email protected]
http://lists.openembedded.org/mailman/listinfo/openembedded-devel

Reply via email to