aboutsummaryrefslogtreecommitdiff
path: root/package/lldpd/0001-build-ability-to-disable-libbsd-with-without-libbsd.patch
diff options
context:
space:
mode:
authorGravatar Trent Piepho <tpiepho@impinj.com>2018-11-22 00:35:44 +0000
committerGravatar Thomas Petazzoni <thomas.petazzoni@bootlin.com>2018-11-23 21:57:32 +0100
commit43b45648b15249b406fc076d4cd92aae765cfaa5 (patch)
treef9435c8439ae393b64181626156b4b25f8dce78e /package/lldpd/0001-build-ability-to-disable-libbsd-with-without-libbsd.patch
parente0032cfc8148ec8557dab4c26c333fe7889f8dcd (diff)
downloadbuildroot-43b45648b15249b406fc076d4cd92aae765cfaa5.tar.gz
buildroot-43b45648b15249b406fc076d4cd92aae765cfaa5.tar.bz2
lldpd: update to version 1.0.1
Drop patches for atom glue and remove CXX compiler check as they are applied upstream. Replace patch to disable libbsd with upstream patch to accomplish the same thing using --without-libbsd. Enable support for readline when that package is enabled. Enable lldpd's systemd unit file. Signed-off-by: Trent Piepho <tpiepho@impinj.com> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
Diffstat (limited to 'package/lldpd/0001-build-ability-to-disable-libbsd-with-without-libbsd.patch')
-rw-r--r--package/lldpd/0001-build-ability-to-disable-libbsd-with-without-libbsd.patch106
1 files changed, 106 insertions, 0 deletions
diff --git a/package/lldpd/0001-build-ability-to-disable-libbsd-with-without-libbsd.patch b/package/lldpd/0001-build-ability-to-disable-libbsd-with-without-libbsd.patch
new file mode 100644
index 0000000000..7301ac636b
--- /dev/null
+++ b/package/lldpd/0001-build-ability-to-disable-libbsd-with-without-libbsd.patch
@@ -0,0 +1,106 @@
+From ff3dcc4ad71c1105bd8ea11afe7e07efd48c038d Mon Sep 17 00:00:00 2001
+From: Vincent Bernat <vincent@bernat.ch>
+Date: Tue, 25 Sep 2018 10:57:49 +0200
+Subject: [PATCH] build: ability to disable libbsd with --without-libbsd
+
+This is useful when user wants to ensure reproducibility of the build
+whatever libbsd is present or not.
+
+Signed-off-by: Trent Piepho <tpiepho@impinj.com>
+---
+ configure.ac | 59 +++++++++++++++++++++++++++++++++++++++--------------------
+ src/marshal.h | 1 +
+ 2 files changed, 40 insertions(+), 20 deletions(-)
+
+diff --git a/configure.ac b/configure.ac
+index 9b40473..589cd96 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -173,26 +173,44 @@ AC_FUNC_REALLOC
+ AC_FUNC_FORK
+
+ # Some functions can be in libbsd
+-PKG_CHECK_MODULES([libbsd], [libbsd-overlay], [
+- _save_CFLAGS="$CFLAGS"
+- _save_LIBS="$LIBS"
+- CFLAGS="$CFLAGS $libbsd_CFLAGS"
+- LIBS="$LIBS $libbsd_LIBS"
+- AC_MSG_CHECKING([if libbsd can be linked correctly])
+- AC_TRY_LINK([
+-@%:@include <sys/time.h>
+-@%:@include <sys/types.h>
+-],[],
+- [
+- AC_MSG_RESULT(yes)
+- LLDP_CFLAGS="$LLDP_CFLAGS $libbsd_CFLAGS"
+- LLDP_LDFLAGS="$LLDP_LDFLAGS $libbsd_LIBS"
+- ],[
+- AC_MSG_RESULT(no)
+- CFLAGS="$_save_CFLAGS"
+- LIBS="$_save_LIBS"
+- ])
+-], [:])
++AC_ARG_WITH([libbsd],
++ AS_HELP_STRING(
++ [--with-libbsd],
++ [Use libbsd @<:@default=auto@:>@]),
++ [],
++ [with_libbsd=auto])
++if test x"$with_libbsd" != x"no"; then
++ PKG_CHECK_MODULES([libbsd], [libbsd-overlay], [
++ _save_CFLAGS="$CFLAGS"
++ _save_LIBS="$LIBS"
++ CFLAGS="$CFLAGS $libbsd_CFLAGS"
++ LIBS="$LIBS $libbsd_LIBS"
++ AC_MSG_CHECKING([if libbsd can be linked correctly])
++ AC_TRY_LINK([
++ @%:@include <sys/time.h>
++ @%:@include <sys/types.h>
++ ],[],
++ [
++ AC_MSG_RESULT(yes)
++ LLDP_CFLAGS="$LLDP_CFLAGS $libbsd_CFLAGS"
++ LLDP_LDFLAGS="$LLDP_LDFLAGS $libbsd_LIBS"
++ with_libbsd=yes
++ ],[
++ AC_MSG_RESULT(no)
++ CFLAGS="$_save_CFLAGS"
++ LIBS="$_save_LIBS"
++ if test x"$with_libbsd" = x"yes"; then
++ AC_MSG_FAILURE([*** no libbsd support found])
++ fi
++ with_libbsd=no
++ ])
++ ], [
++ if test x"$with_libbsd" = x"yes"; then
++ AC_MSG_FAILURE([*** no libbsd support found])
++ fi
++ with_libbsd=no
++ ])
++fi
+
+ # setproctitle may have an _init function
+ AC_REPLACE_FUNCS([setproctitle])
+@@ -412,6 +430,7 @@ cat <<EOF
+ XML output.....: ${with_xml-no}
+ Oldies support.: $enable_oldies
+ seccomp........: ${with_seccomp-no}
++ libbsd.........: ${with_libbsd-no}
+
+ Privilege separation:
+ Enabled........: $enable_privsep
+diff --git a/src/marshal.h b/src/marshal.h
+index b0e8032..0a782d5 100644
+--- a/src/marshal.h
++++ b/src/marshal.h
+@@ -19,6 +19,7 @@
+ #define _MARSHAL_H
+
+ #include <stddef.h>
++#include <stdint.h>
+ #include <sys/types.h>
+
+ struct marshal_info;
+--
+2.14.4
+