mirror of
https://github.com/php/php-src.git
synced 2026-04-18 21:41:22 +02:00
Fix JIT build on solaris/illumos
thr_self to detect the proper thread identifier but all related typedef'd types conflict with the vtune part.
This commit is contained in:
committed by
Nikita Popov
parent
8b822afb0c
commit
727ae51a0c
@@ -61,6 +61,9 @@ void zend_elf_load_symbols(void)
|
||||
return;
|
||||
}
|
||||
int fd = open(path, O_RDONLY);
|
||||
#elif defined(__sun)
|
||||
const char *path = getexecname();
|
||||
int fd = open(path, O_RDONLY);
|
||||
#else
|
||||
// To complete eventually for other ELF platforms.
|
||||
// Otherwise APPLE is Mach-O
|
||||
|
||||
@@ -31,6 +31,9 @@
|
||||
# include <sys/sysctl.h>
|
||||
#elif defined(__NetBSD__)
|
||||
# include <lwp.h>
|
||||
#elif defined(__sun)
|
||||
// avoiding thread.h inclusion as it conflicts with vtunes types.
|
||||
extern unsigned int thr_self(void);
|
||||
#endif
|
||||
|
||||
#include "zend_elf.h"
|
||||
@@ -126,6 +129,9 @@ static void zend_jit_perf_jitdump_open(void)
|
||||
return;
|
||||
}
|
||||
fd = open(path, O_RDONLY);
|
||||
#elif defined(__sun)
|
||||
const char *path = getexecname();
|
||||
fd = open(path, O_RDONLY);
|
||||
#else
|
||||
fd = -1;
|
||||
#endif
|
||||
@@ -209,6 +215,8 @@ static void zend_jit_perf_jitdump_register(const char *name, void *start, size_t
|
||||
thread_id = getthrid();
|
||||
#elif defined(__NetBSD__)
|
||||
thread_id = _lwp_self();
|
||||
#elif defined(__sun)
|
||||
thread_id = thr_self();
|
||||
#endif
|
||||
|
||||
memset(&rec, 0, sizeof(rec));
|
||||
|
||||
Reference in New Issue
Block a user