[sr-dev] git:5.2:cd4f3c7a: core: fix compile error related to missing T_OPT in older (<2.25) glibc (GH #2087)

Henning Westerholt hw at skalatan.de
Wed Oct 2 12:56:19 CEST 2019


Module: kamailio
Branch: 5.2
Commit: cd4f3c7ad82ef11e73a8c5a53cea2fb812b7dd60
URL: https://github.com/kamailio/kamailio/commit/cd4f3c7ad82ef11e73a8c5a53cea2fb812b7dd60

Author: Henning Westerholt <hw at skalatan.de>
Committer: Henning Westerholt <hw at 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/cd4f3c7ad82ef11e73a8c5a53cea2fb812b7dd60.diff
Patch: https://github.com/kamailio/kamailio/commit/cd4f3c7ad82ef11e73a8c5a53cea2fb812b7dd60.patch

---

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"




More information about the sr-dev mailing list