From 4412f8cdfdab2c140f70e10e0932a30c5091373b Mon Sep 17 00:00:00 2001 From: Riza Sulistyo Date: Thu, 13 Oct 2016 04:32:29 +0000 Subject: 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 --- pjlib/include/pj/compat/os_darwinos.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'pjlib/include/pj/compat/os_darwinos.h') diff --git a/pjlib/include/pj/compat/os_darwinos.h b/pjlib/include/pj/compat/os_darwinos.h index 8cccd425..98435a8b 100644 --- a/pjlib/include/pj/compat/os_darwinos.h +++ b/pjlib/include/pj/compat/os_darwinos.h @@ -55,6 +55,8 @@ #define PJ_HAS_WINSOCK_H 0 #define PJ_HAS_WINSOCK2_H 0 +#define PJ_HAS_LOCALTIME_R 1 + /* Is errno a good way to retrieve OS errors? */ #define PJ_HAS_ERRNO_VAR 1 -- cgit v1.2.3