aboutsummaryrefslogtreecommitdiffstats
path: root/main/libvirt/fix-fortify-virnetlink.patch
diff options
context:
space:
mode:
authorNatanael Copa <ncopa@alpinelinux.org>2015-03-23 08:46:23 +0000
committerNatanael Copa <ncopa@alpinelinux.org>2015-03-23 08:46:23 +0000
commitc637c4d6172e2b5e11010bbfb06056c710e3b358 (patch)
tree9c3e3c252412be54540683f1da01d826ebe9992f /main/libvirt/fix-fortify-virnetlink.patch
parent0838d20c0bb333d9ee42b5922dc699a1dfa34757 (diff)
downloadaports-c637c4d6172e2b5e11010bbfb06056c710e3b358.tar.bz2
aports-c637c4d6172e2b5e11010bbfb06056c710e3b358.tar.xz
main/libvirt: fix fortify build and libudev underlinking
Diffstat (limited to 'main/libvirt/fix-fortify-virnetlink.patch')
-rw-r--r--main/libvirt/fix-fortify-virnetlink.patch41
1 files changed, 41 insertions, 0 deletions
diff --git a/main/libvirt/fix-fortify-virnetlink.patch b/main/libvirt/fix-fortify-virnetlink.patch
new file mode 100644
index 0000000000..5b18494133
--- /dev/null
+++ b/main/libvirt/fix-fortify-virnetlink.patch
@@ -0,0 +1,41 @@
+avoid working around old and broken libnl-1.
+
+http://www.redhat.com/archives/libvir-list/2012-August/msg01699.html
+http://www.redhat.com/archives/libvir-list/2012-August/msg01699.html
+
+The workaround breaks fortify:
+
+... -c util/virnetdev.c -fPIC -DPIC -o util/.libs/libvirt_util_la-virnetdev.o
+In file included from ../gnulib/lib/stdio.h:43:0,
+ from /usr/include/netlink/netlink.h:16,
+ from /usr/include/netlink/msg.h:15,
+ from util/virnetlink.h:33,
+ from util/virnetdev.h:29,
+ from util/virnetdev.c:25:
+/usr/include/fortify/stdio.h: In function 'snprintf':
+/usr/include/fortify/stdio.h:93:2: error: invalid use of '__builtin_va_arg_pack ()'
+ return __snprintf_orig(s, n, fmt, __builtin_va_arg_pack());
+ ^
+
+Remove the workaround and require fixed libnl.
+
+--- ./src/util/virnetlink.h.orig
++++ ./src/util/virnetlink.h
+@@ -24,17 +24,7 @@
+ # include "virmacaddr.h"
+
+ # if defined(__linux__) && defined(HAVE_LIBNL)
+-
+-/* Work around a bug where older libnl-1 headers expected older gcc
+- * semantics of 'extern inline' that conflict with C99 semantics. */
+-# ifdef HAVE_LIBNL1
+-# define inline
+-# endif
+ # include <netlink/msg.h>
+-# ifdef HAVE_LIBNL1
+-# undef inline
+-# endif
+-
+ # else
+
+ struct nl_msg;