Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 584284 Details for
Bug 690486
=sys-apps/iproute2-5.2.0 fails to build on musl profile: devlink.c:28:10: fatal error: sys/queue.h: No such file or directory
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
0001-devlink-use-sys-queue.h-from-libbsd-as-a-fallback.patch
0001-devlink-use-sys-queue.h-from-libbsd-as-a-fallback.patch (text/plain), 2.45 KB, created by
Sergei Trofimovich (RETIRED)
on 2019-07-24 08:20:13 UTC
(
hide
)
Description:
0001-devlink-use-sys-queue.h-from-libbsd-as-a-fallback.patch
Filename:
MIME Type:
Creator:
Sergei Trofimovich (RETIRED)
Created:
2019-07-24 08:20:13 UTC
Size:
2.45 KB
patch
obsolete
>From 587e0a740d0b321bdf9a5688159dcadc6618115a Mon Sep 17 00:00:00 2001 >From: Sergei Trofimovich <slyfox@gentoo.org> >Date: Wed, 24 Jul 2019 09:13:18 +0100 >Subject: [PATCH] iproute2: devlink: use sys/queue.h from libbsd as a fallback > >On sys/queue.h does not exist linux-musl targets and >fails build as: > > devlink.c:28:10: fatal error: sys/queue.h: No such file or directory > 28 | #include <sys/queue.h> > | ^~~~~~~~~~~~~ > >The change pulls in 'sys/queue.h' from libbsd in case >system headers don't already provides it. > >Tested on linux-musl and linux-glibc. > >Bug: https://bugs.gentoo.org/690486 >CC: Stephen Hemminger <stephen@networkplumber.org> >CC: netdev@vger.kernel.org >Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org> >--- > configure | 30 ++++++++++++++++++++++++++++++ > devlink/devlink.c | 9 ++++++++- > 2 files changed, 38 insertions(+), 1 deletion(-) > >diff --git a/configure b/configure >index 45fcffb6..a1ee946f 100755 >--- a/configure >+++ b/configure >@@ -323,6 +323,33 @@ check_cap() > fi > } > >+check_sys_queue() >+{ >+ cat >$TMPDIR/queue_test.c <<EOF >+#include <sys/queue.h> >+struct nest_qentry { >+ int attr_type; >+ TAILQ_ENTRY(nest_qentry) nest_entries; >+}; >+int main(int argc, char **argv) { >+ return 0; >+} >+EOF >+ if $CC -I$INCLUDE -o $TMPDIR/queue_test $TMPDIR/queue_test.c >/dev/null 2>&1; then >+ echo "no" >+ else >+ if ${PKG_CONFIG} libbsd --exists; then >+ echo 'CFLAGS += -DHAVE_LIBBSD_SYS_QUEUE' `${PKG_CONFIG} libbsd --cflags` >>$CONFIG >+ echo 'LDLIBS +=' `${PKG_CONFIG} libbsd --libs` >> $CONFIG >+ echo "no" >+ else >+ echo 'CFLAGS += -DNEED_SYS_QUEUE' >>$CONFIG >+ echo "yes" >+ fi >+ fi >+ rm -f $TMPDIR/queue_test.c $TMPDIR/queue_test >+} >+ > quiet_config() > { > cat <<EOF >@@ -398,6 +425,9 @@ check_strlcpy > echo -n "libcap support: " > check_cap > >+echo -n "need for sys/queue.h API: " >+check_sys_queue >+ > echo >> $CONFIG > echo "%.o: %.c" >> $CONFIG > echo ' $(QUIET_CC)$(CC) $(CFLAGS) $(EXTRA_CFLAGS) $(CPPFLAGS) -c -o $@ $<' >> $CONFIG >diff --git a/devlink/devlink.c b/devlink/devlink.c >index bb023c0c..fd91198c 100644 >--- a/devlink/devlink.c >+++ b/devlink/devlink.c >@@ -25,7 +25,14 @@ > #include <linux/devlink.h> > #include <libmnl/libmnl.h> > #include <netinet/ether.h> >-#include <sys/queue.h> >+#ifdef HAVE_LIBBSD_SYS_QUEUE >+# include <bsd/sys/queue.h> >+#else >+# include <sys/queue.h> >+#endif >+#ifdef NEED_SYS_QUEUE >+# error "No <sys/queue.h> implementation found." >+#endif > > #include "SNAPSHOT.h" > #include "list.h" >-- >2.22.0 >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 690486
:
584150
|
584284
|
584756