Lines 26-32
Link Here
|
26 |
#include <stdlib.h> |
26 |
#include <stdlib.h> |
27 |
#include <string.h> |
27 |
#include <string.h> |
28 |
#include <sys/mman.h> |
28 |
#include <sys/mman.h> |
|
|
29 |
#if defined __GLIBC__ |
29 |
#include <sys/pidfd.h> |
30 |
#include <sys/pidfd.h> |
|
|
31 |
#else |
32 |
#include <sys/syscall.h> |
33 |
#endif /* __GLIBC__ */ |
30 |
#include <sys/resource.h> |
34 |
#include <sys/resource.h> |
31 |
#if defined HAVE_SYSTEMD |
35 |
#if defined HAVE_SYSTEMD |
32 |
#include <systemd/sd-daemon.h> |
36 |
#include <systemd/sd-daemon.h> |
Lines 107-112
static long process_ksm_status(int pidfd, unsigned int flags)
Link Here
|
107 |
return syscall(__NR_process_ksm_status, pidfd, flags); |
111 |
return syscall(__NR_process_ksm_status, pidfd, flags); |
108 |
} |
112 |
} |
109 |
|
113 |
|
|
|
114 |
#if !defined __GLIBC__ |
115 |
static int pidfd_open(pid_t pid, unsigned int flags) |
116 |
{ |
117 |
return syscall(__NR_pidfd_open, pid, flags); |
118 |
} |
119 |
#endif /* __MUSL__ */ |
120 |
|
110 |
static long process_ksm(pid_t pid, enum pksm_action _action) |
121 |
static long process_ksm(pid_t pid, enum pksm_action _action) |
111 |
{ |
122 |
{ |
112 |
long ret; |
123 |
long ret; |