浏览代码

Fix building when pidfd_open is available

On glibc2.36 pidfd_open was made available, but it needs an include
Nyikos Zoltán 2 年之前
父节点
当前提交
4934191b19
共有 1 个文件被更改,包括 2 次插入0 次删除
  1. 2 0
      common/common-pidfds.c

+ 2 - 0
common/common-pidfds.c

@@ -58,6 +58,8 @@ static int pidfd_open(pid_t pid, unsigned int flags)
 {
 {
 	return (int)syscall(__NR_pidfd_open, pid, flags);
 	return (int)syscall(__NR_pidfd_open, pid, flags);
 }
 }
+#else
+#include <sys/pidfd.h>
 #endif
 #endif
 
 
 /* pidfd functions */
 /* pidfd functions */