Browse code

core: fix compile error related to missing T_OPT in older (<2.25) glibc (GH #2087)

Henning Westerholt authored on 01/10/2019 16:00:13
Showing 1 changed files
... ...
@@ -32,6 +32,13 @@
32 32
 #include <resolv.h>
33 33
 #include <string.h>
34 34
 
35
+/* older glibc < 2.25 does not include T_OPT in nameser_compat.h yet */
36
+#if __GLIBC__ == 2 && __GLIBC_MINOR__ < 25
37
+#ifndef T_OPT
38
+#define T_OPT ns_t_opt
39
+#endif
40
+#endif
41
+
35 42
 #include "resolve.h"
36 43
 #include "compiler_opt.h"
37 44
 #include "dprint.h"