File: Fix-building-when-pidfd_open-is-available.patch

package info (click to toggle)
gamemode 1.7-2
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 620 kB
  • sloc: ansic: 4,636; sh: 101; xml: 33; makefile: 7
file content (24 lines) | stat: -rw-r--r-- 702 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
From: =?utf-8?q?Nyikos_Zolt=C3=A1n?= <nyikoszoltan0@gmail.com>
Date: Wed, 10 Aug 2022 19:56:59 +0200
Subject: Fix building when pidfd_open is available

On glibc2.36 pidfd_open was made available, but it needs an include

(cherry picked from commit 4934191b1928ef695c3e8af21e75781f8591745f)
---
 common/common-pidfds.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/common/common-pidfds.c b/common/common-pidfds.c
index 00929f7..61442e3 100644
--- a/common/common-pidfds.c
+++ b/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);
 }
+#else
+#include <sys/pidfd.h>
 #endif
 
 /* pidfd functions */