thr_self to detect the proper thread identifier but all
related typedef'd types conflict with the vtune part.
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
# 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"
return;
}
fd = open(path, O_RDONLY);
+#elif defined(__sun)
+ const char *path = getexecname();
+ fd = open(path, O_RDONLY);
#else
fd = -1;
#endif
thread_id = getthrid();
#elif defined(__NetBSD__)
thread_id = _lwp_self();
+#elif defined(__sun)
+ thread_id = thr_self();
#endif
memset(&rec, 0, sizeof(rec));