summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorzuul <zuul@gerrit.asterisk.org>2017-03-20 13:07:51 -0500
committerGerrit Code Review <gerrit2@gerrit.digium.api>2017-03-20 13:07:51 -0500
commit24ada76408db41e5664b60f07e8940744d97a4c6 (patch)
treedf4a29f200f61bc716ab9159787ad1e6bfe8f9a5 /include
parent516e028b44518738dc7bd9534aab153cf11f44cb (diff)
parentfc71c18a9b572296e171eb6b1f87aee5c2256c8c (diff)
Merge "thread safety: Don't use getprotobyname()"
Diffstat (limited to 'include')
-rw-r--r--include/asterisk/network.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/include/asterisk/network.h b/include/asterisk/network.h
index 3371e5895..5216f4c61 100644
--- a/include/asterisk/network.h
+++ b/include/asterisk/network.h
@@ -86,6 +86,11 @@ const char *ast_inet_ntoa(struct in_addr ia);
#endif
#define inet_ntoa __dont__use__inet_ntoa__use__ast_inet_ntoa__instead__
+#ifdef getprotobyname
+#undef getprotobyname
+#endif
+#define getprotobyname __getprotobyname_is_not_threadsafe__do_not_use__
+
/*! \brief Compares the source address and port of two sockaddr_in */
static force_inline int inaddrcmp(const struct sockaddr_in *sin1, const struct sockaddr_in *sin2)
{