summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDan Williams <dcbw@redhat.com>2012-01-09 19:12:14 -0600
committerDan Williams <dcbw@redhat.com>2012-01-09 19:25:53 -0600
commit7cb48717f64f92d2ba6b661159a68d3e08ff087a (patch)
tree5386bc3df052776da3cfcff487dfa1d59c6ec015
parent7d4f62b4c5a3866980a32cbe2da9e6088800a8a8 (diff)
lib: fix for libnl1
-rw-r--r--lib/internal.h1
-rw-r--r--lib/libnl-compat.h37
2 files changed, 20 insertions, 18 deletions
diff --git a/lib/internal.h b/lib/internal.h
index 81d15e0..5367692 100644
--- a/lib/internal.h
+++ b/lib/internal.h
@@ -38,6 +38,7 @@
#define __lib_internal_h__
#include <wimaxll.h>
+#include "libnl-compat.h"
struct nl_msg;
struct nlmsgerr;
diff --git a/lib/libnl-compat.h b/lib/libnl-compat.h
index 6c4ba1a..6f0be4d 100644
--- a/lib/libnl-compat.h
+++ b/lib/libnl-compat.h
@@ -38,6 +38,8 @@
#include <netlink/cache.h>
#include <netlink/utils.h>
#include <netlink/data.h>
+#include <netlink/genl/ctrl.h>
+
/* libnl-2.0 compat functions */
#ifdef HAVE_LIBNL2
@@ -59,24 +61,6 @@
#define nl_socket_set_passcred nl_set_passcred
#define nl_socket_disable_seq_check nl_disable_sequence_check
#define nlmsg_datalen nlmsg_len
-#define nlmsg_alloc nlmsg_new
-
-/* libnl-1.0 functions with modified prototypes in libnl-2/3*/
-static inline const char *
-__nl_geterror (int err)
-{
- /* err is set, can be parsed */
- return nl_geterror ();
-}
-#define nl_geterror __nl_geterror
-
-static inline int
-__genl_ctrl_alloc_cache(struct nl_sock *sk, struct nl_cache **cache)
-{
- *cache = genl_ctrl_alloc_cache(sk);
- return *cache ? 0 : NLE_FAILURE;
-}
-#define genl_ctrl_alloc_cache __genl_ctrl_alloc_cache
#define NLE_SUCCESS 0
#define NLE_FAILURE 1
@@ -109,6 +93,23 @@ __genl_ctrl_alloc_cache(struct nl_sock *sk, struct nl_cache **cache)
#define NLE_PERM 28
#define NLE_PKTLOC_FILE 29
+/* libnl-1.0 functions with modified prototypes in libnl-2/3*/
+static inline const char *
+__nl_geterror (int err)
+{
+ /* err is set, can be parsed */
+ return nl_geterror ();
+}
+#define nl_geterror __nl_geterror
+
+static inline int
+__genl_ctrl_alloc_cache(struct nl_sock *sk, struct nl_cache **cache)
+{
+ *cache = genl_ctrl_alloc_cache(sk);
+ return *cache ? 0 : NLE_FAILURE;
+}
+#define genl_ctrl_alloc_cache __genl_ctrl_alloc_cache
+
#endif /* HAVE_LIBNL1 */
#endif /* lib_libnl_compat_h */