aboutsummaryrefslogtreecommitdiffstats
path: root/main/libvirt/fix-fortify-virnetlink.patch
blob: 5b1849413353c3fb2618e5d6c3b57845d14feab4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
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;