ipacm: Remove compilation dependency for in_addr_t on bionic
Add changes to avoid compilation dependency with in_addr_t.
Change-Id: I31f85385ce87e584bfb07b78b1c4eb32c7e9742a
diff --git a/ipacm/inc/IPACM_ConntrackClient.h b/ipacm/inc/IPACM_ConntrackClient.h
index 16d5b9c..4ceff43 100644
--- a/ipacm/inc/IPACM_ConntrackClient.h
+++ b/ipacm/inc/IPACM_ConntrackClient.h
@@ -33,6 +33,9 @@
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
+#ifndef in_addr_t
+typedef uint32_t in_addr_t;
+#endif
#include <arpa/inet.h>
#include <netinet/in.h>
#include <errno.h>
diff --git a/ipacm/inc/IPACM_ConntrackListener.h b/ipacm/inc/IPACM_ConntrackListener.h
index 2977af7..110fdcc 100644
--- a/ipacm/inc/IPACM_ConntrackListener.h
+++ b/ipacm/inc/IPACM_ConntrackListener.h
@@ -35,6 +35,9 @@
#include <string.h>
#include <fcntl.h>
+#ifndef in_addr_t
+typedef uint32_t in_addr_t;
+#endif
#include <arpa/inet.h>
#include <netinet/in.h>
#include <errno.h>
diff --git a/ipacm/inc/IPACM_Netlink.h b/ipacm/inc/IPACM_Netlink.h
index 81f1968..ae3ab3f 100644
--- a/ipacm/inc/IPACM_Netlink.h
+++ b/ipacm/inc/IPACM_Netlink.h
@@ -52,7 +52,6 @@
#include <sys/select.h>
#include <sys/socket.h>
#include <linux/socket.h>
-#include <inaddr.h>
#define sockaddr_storage __kernel_sockaddr_storage
#include <linux/if.h>
#include <linux/if_addr.h>
diff --git a/ipacm/inc/IPACM_Xml.h b/ipacm/inc/IPACM_Xml.h
index 64c00ed..5954e1b 100644
--- a/ipacm/inc/IPACM_Xml.h
+++ b/ipacm/inc/IPACM_Xml.h
@@ -45,6 +45,9 @@
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
+#ifndef in_addr_t
+typedef uint32_t in_addr_t;
+#endif
#include <arpa/inet.h>
#include <stdint.h>
#include <libxml/parser.h>
diff --git a/ipacm/src/IPACM_ConntrackClient.cpp b/ipacm/src/IPACM_ConntrackClient.cpp
index 29afd50..a953626 100644
--- a/ipacm/src/IPACM_ConntrackClient.cpp
+++ b/ipacm/src/IPACM_ConntrackClient.cpp
@@ -31,6 +31,9 @@
#include <stdlib.h>
#include <string.h>
#include <errno.h>
+#ifndef in_addr_t
+typedef uint32_t in_addr_t;
+#endif
#include <arpa/inet.h>
#include <netinet/in.h>
#include <sys/ioctl.h>
diff --git a/ipacm/src/IPACM_Xml.cpp b/ipacm/src/IPACM_Xml.cpp
index d59bbb0..9c4af41 100644
--- a/ipacm/src/IPACM_Xml.cpp
+++ b/ipacm/src/IPACM_Xml.cpp
@@ -39,6 +39,9 @@
#include <sys/socket.h>
#include <netinet/in.h>
+#ifndef in_addr_t
+typedef uint32_t in_addr_t;
+#endif
#include <arpa/inet.h>
#include "IPACM_Xml.h"