Compile fix libnl - hidden symbol `__clz_tab' (fix #3899) - thanks to gig-tmp
[openwrt.git] / package / libnl / patches / 140-fix-linking-libnl-genl.patch
1 diff -U 3 -H -d -r -N -- libnl-1.1.o/include/netlink/genl/mngt.h libnl-1.1/include/netlink/genl/mngt.h
2 --- libnl-1.1.o/include/netlink/genl/mngt.h     2008-01-14 18:48:45.000000000 +0300
3 +++ libnl-1.1/include/netlink/genl/mngt.h       2008-08-18 19:18:54.000000000 +0400
4 @@ -22,6 +22,15 @@
5  
6  struct nl_cache_ops;
7  
8 +struct genl_info
9 +{
10 +        struct sockaddr_nl *    who;
11 +        struct nlmsghdr *       nlh;
12 +       struct genlmsghdr *     genlhdr;
13 +       void *                  userhdr;
14 +       struct nlattr **        attrs;
15 +};
16 +
17  /**
18   * @ingroup genl_mngt
19   * Generic Netlink Command
20 diff -U 3 -H -d -r -N -- libnl-1.1.o/include/netlink-types.h libnl-1.1/include/netlink-types.h
21 --- libnl-1.1.o/include/netlink-types.h 2008-01-14 18:48:45.000000000 +0300
22 +++ libnl-1.1/include/netlink-types.h   2008-08-18 19:18:30.000000000 +0400
23 @@ -95,15 +95,6 @@
24  
25  struct nl_parser_param;
26  
27 -struct genl_info
28 -{
29 -       struct sockaddr_nl *    who;
30 -       struct nlmsghdr *       nlh;
31 -       struct genlmsghdr *     genlhdr;
32 -       void *                  userhdr;
33 -       struct nlattr **        attrs;
34 -};
35 -
36  #define LOOSE_FLAG_COMPARISON  1
37  
38  #define NL_OBJ_MARK            1
39 diff -U 3 -H -d -r -N -- libnl-1.1.o/src/nl-list-caches.c libnl-1.1/src/nl-list-caches.c
40 --- libnl-1.1.o/src/nl-list-caches.c    2008-01-14 18:48:45.000000000 +0300
41 +++ libnl-1.1/src/nl-list-caches.c      2008-08-18 19:20:05.000000000 +0400
42 @@ -10,6 +10,7 @@
43   */
44  
45  #include "utils.h"
46 +#include <netlink-local.h>
47  
48  static void print_usage(void)
49  {
50 diff -U 3 -H -d -r -N -- libnl-1.1.o/src/utils.c libnl-1.1/src/utils.c
51 --- libnl-1.1.o/src/utils.c     2008-01-14 18:48:45.000000000 +0300
52 +++ libnl-1.1/src/utils.c       2008-08-18 19:20:39.000000000 +0400
53 @@ -12,6 +12,7 @@
54  #include "utils.h"
55  
56  #include <stdlib.h>
57 +#include <stdarg.h>
58  
59  int nltool_init(int argc, char *argv[])
60  {
61 diff -U 3 -H -d -r -N -- libnl-1.1.o/src/utils.h libnl-1.1/src/utils.h
62 --- libnl-1.1.o/src/utils.h     2008-01-14 18:48:45.000000000 +0300
63 +++ libnl-1.1/src/utils.h       2008-08-18 19:21:11.000000000 +0400
64 @@ -22,7 +22,6 @@
65  #include <sys/types.h>
66  #include <sys/socket.h>
67  
68 -#include <netlink-local.h>
69  #include <netlink/netlink.h>
70  #include <netlink/utils.h>
71  #include <netlink/addr.h>