From b5cb91721fc3c5db1de9d12b330a896d5dd174ba Mon Sep 17 00:00:00 2001 From: Tijmen Wildervanck Date: Fri, 13 Oct 2017 20:04:32 +0200 Subject: 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. --- jni/iodine/src/android_dns.h | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'jni/iodine') 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 +#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__ -- cgit v1.2.1