Skip to content

Commit 6b45ead

Browse files
committed
add gettid macro for old glibc
1 parent 017591a commit 6b45ead

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

Zend/zend_execute_API.c

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,11 @@
5050
# ifndef sigev_notify_thread_id
5151
# define sigev_notify_thread_id _sigev_un._tid
5252
# endif
53+
// Old versions of glibc miss gettid()
54+
# if __GLIBC__ == 2 && __GLIBC_MINOR__ < 30
55+
# include <sys/syscall.h>
56+
# define gettid() syscall(SYS_gettid)
57+
# endif
5358
#endif
5459

5560
ZEND_API void (*zend_execute_ex)(zend_execute_data *execute_data);

0 commit comments

Comments
 (0)