summaryrefslogtreecommitdiff
path: root/jni/iodine/src
diff options
context:
space:
mode:
authorTijmen Wildervanck <Tijmen.Wildervanck@gmail.com>2017-10-13 20:04:32 +0200
committeryvesf <yvesf-git@xapek.org>2017-10-13 23:38:16 +0200
commitb5cb91721fc3c5db1de9d12b330a896d5dd174ba (patch)
tree839247a88ac0a9177264cec6a6415675c05d8b80 /jni/iodine/src
parenta4688cdeed46c31e32f494bfe157401affe2b489 (diff)
downloadandiodine-b5cb91721fc3c5db1de9d12b330a896d5dd174ba.tar.gz
andiodine-b5cb91721fc3c5db1de9d12b330a896d5dd174ba.zip
Fix a double header definition on newer NDK versions.
Newer Android NDK versions (>21) have APRA Nameser_compat.h, which causes a double struct definition. This patch checks if APRA nameser.h includes APRA nameser_compat.h and if that is the case, it disables android_dns.h.
Diffstat (limited to 'jni/iodine/src')
-rw-r--r--jni/iodine/src/android_dns.h5
1 files changed, 4 insertions, 1 deletions
diff --git a/jni/iodine/src/android_dns.h b/jni/iodine/src/android_dns.h
index dafd8ec..1571743 100644
--- a/jni/iodine/src/android_dns.h
+++ b/jni/iodine/src/android_dns.h
@@ -1,6 +1,8 @@
#ifndef __FIX_ANDROID_H__
#define __FIX_ANDROID_H__
+#include <arpa/nameser.h>
+#ifndef _ARPA_NAMESER_COMPAT_
typedef struct {
unsigned id :16;
@@ -36,4 +38,5 @@ typedef struct {
#define T_TXT 16
#define T_SRV 33
-#endif
+#endif //_ARPA_NAMESER_COMPAT_
+#endif //__FIX_ANDROID_H__