summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMathieu Poirier <mathieu.poirier@linaro.org>2013-12-17 14:56:47 -0700
committerMathieu Poirier <mathieu.poirier@linaro.org>2014-01-07 11:31:50 -0700
commitd8928c19bba91a9e6fd6bcfb74db97e00ab512e9 (patch)
treec33ecf89a722916f03839895e7e8fbe25d6d839d
parent513e45ccce5ae286fc67fde1a1bf703e9c8d83aa (diff)
downloadandroid_external_libnl-d8928c19bba91a9e6fd6bcfb74db97e00ab512e9.tar.gz
android_external_libnl-d8928c19bba91a9e6fd6bcfb74db97e00ab512e9.tar.bz2
android_external_libnl-d8928c19bba91a9e6fd6bcfb74db97e00ab512e9.zip
Compile 2.0 with Kitkat
Mostly following example set by Arik Nemtsov for Froyo. Change-Id: I4c6b56e32f8a9f80bbd224e62e26052074b428d9 Signed-off-by: Mathieu Poirier <mathieu.poirier@linaro.org>
-rw-r--r--Android.mk34
-rw-r--r--include/linux/if_bad.h (renamed from include/linux/if.h)6
-rw-r--r--include/netlink-local.h1
3 files changed, 37 insertions, 4 deletions
diff --git a/Android.mk b/Android.mk
new file mode 100644
index 0000000..b01e375
--- /dev/null
+++ b/Android.mk
@@ -0,0 +1,34 @@
+LOCAL_PATH:= $(call my-dir)
+
+include $(CLEAR_VARS)
+
+LOCAL_SRC_FILES := lib/cache.c \
+ lib/data.c \
+ lib/nl.c \
+ lib/doc.c \
+ lib/cache_mngr.c \
+ lib/addr.c \
+ lib/socket.c \
+ lib/fib_lookup/lookup.c \
+ lib/fib_lookup/request.c \
+ lib/msg.c \
+ lib/object.c \
+ lib/attr.c \
+ lib/utils.c \
+ lib/cache_mngt.c \
+ lib/handlers.c \
+ lib/genl/ctrl.c \
+ lib/genl/mngt.c \
+ lib/genl/family.c \
+ lib/genl/genl.c \
+ lib/route/rtnl.c \
+ lib/route/route_utils.c \
+ lib/netfilter/nfnl.c \
+ lib/error.c
+
+LOCAL_C_INCLUDES := $(LOCAL_PATH)/include
+
+LOCAL_MODULE_TAGS := eng
+LOCAL_MODULE := libnl
+
+include $(BUILD_SHARED_LIBRARY)
diff --git a/include/linux/if.h b/include/linux/if_bad.h
index 4c1bcfe..857ce1e 100644
--- a/include/linux/if.h
+++ b/include/linux/if_bad.h
@@ -107,7 +107,7 @@ enum {
};
/*
- * Device mapping structure. I'd just gone off and designed a
+ * Device mapping structure. I'd just gone off and designed a
* beautiful scheme using only loadable modules with arguments
* for driver options and along come the PCMCIA people 8)
*
@@ -116,11 +116,11 @@ enum {
* being very small might be worth keeping for clean configuration.
*/
-struct ifmap
+struct ifmap
{
unsigned long mem_start;
unsigned long mem_end;
- unsigned short base_addr;
+ unsigned short base_addr;
unsigned char irq;
unsigned char dma;
unsigned char port;
diff --git a/include/netlink-local.h b/include/netlink-local.h
index e0c79db..7e33119 100644
--- a/include/netlink-local.h
+++ b/include/netlink-local.h
@@ -114,7 +114,6 @@ static inline int nl_cb_call(struct nl_cb *cb, int type, struct nl_msg *msg)
}
#define ARRAY_SIZE(X) (sizeof(X) / sizeof((X)[0]))
-#define offsetof(TYPE, MEMBER) ((size_t) &((TYPE *)0)->MEMBER)
#define __init __attribute__ ((constructor))
#define __exit __attribute__ ((destructor))