zombiecong / sctp-refimpl

Automatically exported from code.google.com/p/sctp-refimpl
0 stars 0 forks source link

Build in android #15

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
android ndk have no <ifaddrs.h>

stupid working solution:
get ifaddrs.h ifaddrs.c from here:
https://github.com/kmackay/android-ifaddrs

and

--- a/netinet/sctp_os_userspace.h
+++ b/netinet/sctp_os_userspace.h
@@ -496,8 +496,12 @@ struct sx {int dummy;};
 #include <sys/types.h>
 #if !defined(__Userspace_os_Windows)
 #if defined(INET) || defined(INET6)
+#if defined(__ANDROID__)
+#include "ifaddrs.h"
+#else
 #include <ifaddrs.h>
 #endif
+#endif

Original issue reported on code.google.com by pro...@gmail.com on 4 May 2015 at 7:08

GoogleCodeExporter commented 9 years ago
+#if defined(__ANDROID__)
+#include "ifaddrs.h"
+#else
 #include <ifaddrs.h>
 #endif
I think adding -Ipath/to/headers/ when compiling is a better way and then you 
don't need to modify the current file.

Original comment by swordfen...@gmail.com on 14 Jun 2015 at 3:51