Module: kamailio Branch: 5.2 Commit: cd4f3c7ad82ef11e73a8c5a53cea2fb812b7dd60 URL: https://github.com/kamailio/kamailio/commit/cd4f3c7ad82ef11e73a8c5a53cea2fb8...
Author: Henning Westerholt hw@skalatan.de Committer: Henning Westerholt hw@skalatan.de Date: 2019-10-02T12:45:05+02:00
core: fix compile error related to missing T_OPT in older (<2.25) glibc (GH #2087)
(cherry picked from commit 325d1e6d53b3db3265d6f76ec34bb3d6a31419c4)
---
Modified: src/core/resolve.c
---
Diff: https://github.com/kamailio/kamailio/commit/cd4f3c7ad82ef11e73a8c5a53cea2fb8... Patch: https://github.com/kamailio/kamailio/commit/cd4f3c7ad82ef11e73a8c5a53cea2fb8...
---
diff --git a/src/core/resolve.c b/src/core/resolve.c index fd74441bf6..9f9705341e 100644 --- a/src/core/resolve.c +++ b/src/core/resolve.c @@ -32,6 +32,13 @@ #include <resolv.h> #include <string.h>
+/* older glibc < 2.25 does not include T_OPT in nameser_compat.h yet */ +#if __GLIBC__ == 2 && __GLIBC_MINOR__ < 25 +#ifndef T_OPT +#define T_OPT ns_t_opt +#endif +#endif + #include "resolve.h" #include "compiler_opt.h" #include "dprint.h"