From dc515feae51e247270bb440e40b8346eb3af7b46 Mon Sep 17 00:00:00 2001 From: Daniel Morante Date: Sun, 9 Aug 2020 21:58:37 -0400 Subject: Remove need for /proc on FreeBSD Change-Id: Ieebd9a54307813954011ac8833824831dce6da10 Fixes: #1376 --- libglusterfs/src/syscall.c | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) (limited to 'libglusterfs/src/syscall.c') diff --git a/libglusterfs/src/syscall.c b/libglusterfs/src/syscall.c index 03e5924a1c..04400f98b6 100644 --- a/libglusterfs/src/syscall.c +++ b/libglusterfs/src/syscall.c @@ -13,6 +13,10 @@ #include "glusterfs/mem-pool.h" #include "glusterfs/libglusterfs-messages.h" +#ifdef __FreeBSD__ +#include +#include +#endif #include #include #include @@ -854,3 +858,19 @@ sys_copy_file_range(int fd_in, off64_t *off_in, int fd_out, off64_t *off_out, #endif /* HAVE_COPY_FILE_RANGE_SYS */ #endif /* HAVE_COPY_FILE_RANGE */ } + +#ifdef __FreeBSD__ +int +sys_kill(pid_t pid, int sig) +{ + return FS_RET_CHECK0(kill(pid, sig), errno); +} + +int +sys_sysctl(const int *name, u_int namelen, void *oldp, size_t *oldlenp, + const void *newp, size_t newlen) +{ + return FS_RET_CHECK0(sysctl(name, namelen, oldp, oldlenp, newp, newlen), + errno); +} +#endif -- cgit