Fix build of io.ptrace in openbsd (#18774)

This commit is contained in:
David CARLIER 2021-05-28 23:16:14 +01:00 committed by GitHub
parent 212f2345ba
commit adbb324eb0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 6 additions and 0 deletions

View File

@ -13,7 +13,9 @@ LDFLAGS+=-lm
else
ifneq (${OSTYPE},linux)
LDFLAGS+=-lpthread
ifeq (${OSTYPE},freebsd)
LDFLAGS+=-ldl
endif
LDFLAGS+=-lm
endif
endif

View File

@ -52,6 +52,10 @@ typedef void * r_ptrace_data_t;
#elif __APPLE__
typedef int r_ptrace_request_t;
typedef int r_ptrace_data_t;
#elif __OpenBSD__
typedef int r_ptrace_request_t;
typedef int r_ptrace_data_t;
#define R_PTRACE_NODATA 0
#else
typedef int r_ptrace_request_t;
typedef void *r_ptrace_data_t;