summaryrefslogtreecommitdiffstats
path: root/luni
diff options
context:
space:
mode:
authorElliott Hughes <enh@google.com>2014-12-10 15:22:30 -0800
committerElliott Hughes <enh@google.com>2014-12-10 15:25:40 -0800
commitc544b580a1a5535c2d653b58f3843ef61c21d646 (patch)
tree7040478bbd87489c975a320a34257b19353a00db /luni
parent4f1eff2da4abd01b866974538a53683bff82591d (diff)
downloadlibcore-c544b580a1a5535c2d653b58f3843ef61c21d646.zip
libcore-c544b580a1a5535c2d653b58f3843ef61c21d646.tar.gz
libcore-c544b580a1a5535c2d653b58f3843ef61c21d646.tar.bz2
Don't include private bionic headers.
Change-Id: I25691f095e1b6b2009c01b6e990fffb84b12f7f2
Diffstat (limited to 'luni')
-rw-r--r--luni/src/main/native/Portability.h15
-rw-r--r--luni/src/main/native/libcore_io_Posix.cpp1
2 files changed, 8 insertions, 8 deletions
diff --git a/luni/src/main/native/Portability.h b/luni/src/main/native/Portability.h
index 1520311..1aaf7a3 100644
--- a/luni/src/main/native/Portability.h
+++ b/luni/src/main/native/Portability.h
@@ -65,7 +65,7 @@ static inline int mincore(void* addr, size_t length, unsigned char* vec) {
#include <sys/param.h>
#include <sys/mount.h>
-#else // defined(__APPLE__)
+#else
// Bionic or glibc.
@@ -73,15 +73,16 @@ static inline int mincore(void* addr, size_t length, unsigned char* vec) {
#include <sys/sendfile.h>
#include <sys/statvfs.h>
-#endif // defined(__APPLE__)
+#endif
-#if !defined(__BIONIC__)
#include <netdb.h>
-#include "../../bionic/libc/dns/include/resolv_netid.h"
-inline int android_getaddrinfofornet(const char *hostname, const char *servname,
- const struct addrinfo *hints, unsigned /*netid*/, unsigned /*mark*/, struct addrinfo **res) {
+#if defined(__BIONIC__)
+extern "C" int android_getaddrinfofornet(const char*, const char*, const struct addrinfo*, unsigned, unsigned, struct addrinfo**);
+#else
+static inline int android_getaddrinfofornet(const char* hostname, const char* servname,
+ const struct addrinfo* hints, unsigned /*netid*/, unsigned /*mark*/, struct addrinfo** res) {
return getaddrinfo(hostname, servname, hints, res);
}
-#endif // !defined(__BIONIC__)
+#endif
#endif // PORTABILITY_H_included
diff --git a/luni/src/main/native/libcore_io_Posix.cpp b/luni/src/main/native/libcore_io_Posix.cpp
index e9bdab0..ce29226 100644
--- a/luni/src/main/native/libcore_io_Posix.cpp
+++ b/luni/src/main/native/libcore_io_Posix.cpp
@@ -25,7 +25,6 @@
#include "NetworkUtilities.h"
#include "Portability.h"
#include "readlink.h"
-#include "../../bionic/libc/dns/include/resolv_netid.h" // For android_getaddrinfofornet.
#include "ScopedBytes.h"
#include "ScopedLocalRef.h"
#include "ScopedPrimitiveArray.h"