summaryrefslogtreecommitdiff
path: root/aconfigure.ac
diff options
context:
space:
mode:
authorRiza Sulistyo <riza@teluu.com>2016-10-13 04:32:29 +0000
committerRiza Sulistyo <riza@teluu.com>2016-10-13 04:32:29 +0000
commit4412f8cdfdab2c140f70e10e0932a30c5091373b (patch)
tree0eb2b2fc7b9d1bffe8a2ac031180e187e1be0666 /aconfigure.ac
parent94144542bbf37dd74b10865a4125ddaf9c119068 (diff)
Re #1945 (misc): Use localtime_r() instead of localtime() (if available) since localtime() is not thread safe.
This fixes a data race in pj_time_decode() which is called from multiple threads. Thanks to Kal (b17 c0de) for the patch. git-svn-id: http://svn.pjsip.org/repos/pjproject/trunk@5458 74dad513-b988-da41-8d7b-12977e46ad98
Diffstat (limited to 'aconfigure.ac')
-rw-r--r--aconfigure.ac3
1 files changed, 3 insertions, 0 deletions
diff --git a/aconfigure.ac b/aconfigure.ac
index df9e1ae2..387a37ce 100644
--- a/aconfigure.ac
+++ b/aconfigure.ac
@@ -265,6 +265,9 @@ AC_CHECK_HEADER(net/if.h,[AC_DEFINE(PJ_HAS_NET_IF_H,1)],[],
# include <sys/socket.h>
#endif
])
+
+AC_CHECK_FUNC(localtime_r,[AC_DEFINE(PJ_HAS_LOCALTIME_R,1)])
+
AC_MSG_RESULT([Setting PJ_OS_NAME to $target])
AC_DEFINE_UNQUOTED(PJ_OS_NAME,["$target"])