Skip to content

DragonFlyBSD build update for opcache JIT part. #6339

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions ext/opcache/jit/zend_elf.c
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@

#include <sys/types.h>
#include <sys/stat.h>
#if defined(__FreeBSD__)
#if defined(__FreeBSD__) || defined(__DragonFly__)
#include <sys/sysctl.h>
#elif defined(__HAIKU__)
#include <FindDirectory.h>
Expand Down Expand Up @@ -55,7 +55,7 @@ void zend_elf_load_symbols(void)
int fd = open("/proc/self/exe", O_RDONLY);
#elif defined(__NetBSD__)
int fd = open("/proc/curproc/exe", O_RDONLY);
#elif defined(__FreeBSD__)
#elif defined(__FreeBSD__) || defined(__DragonFly__)
char path[PATH_MAX];
size_t pathlen = sizeof(path);
int mib[4] = {CTL_KERN, KERN_PROC, KERN_PROC_PATHNAME, -1};
Expand Down
7 changes: 6 additions & 1 deletion ext/opcache/jit/zend_jit_perf_dump.c
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,9 @@
# include <sys/sysctl.h>
#elif defined(__NetBSD__)
# include <lwp.h>
#elif defined(__DragonFly__)
# include <sys/lwp.h>
# include <sys/sysctl.h>
#elif defined(__sun)
// avoiding thread.h inclusion as it conflicts with vtunes types.
extern unsigned int thr_self(void);
Expand Down Expand Up @@ -124,7 +127,7 @@ static void zend_jit_perf_jitdump_open(void)
fd = open("/proc/self/exe", O_RDONLY);
#elif defined(__NetBSD__)
fd = open("/proc/curproc/exe", O_RDONLY);
#elif defined(__FreeBSD__)
#elif defined(__FreeBSD__) || defined(__DragonFly__)
char path[PATH_MAX];
size_t pathlen = sizeof(path);
int mib[4] = {CTL_KERN, KERN_PROC, KERN_PROC_PATHNAME, -1};
Expand Down Expand Up @@ -226,6 +229,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(__DragonFly__)
thread_id = lwp_gettid();
#elif defined(__sun)
thread_id = thr_self();
#endif
Expand Down