ebbc582912
Related to: <https://fedoraproject.org/wiki/Changes/PortingToModernC> <https://fedoraproject.org/wiki/Toolchain/PortingToModernC>
22 lines
544 B
Diff
22 lines
544 B
Diff
test-pidfd-getfd: Include <syspidfd.h> if available for pidfd_getfd
|
|
|
|
Submitted upstream:
|
|
|
|
<https://github.com/ColinIanKing/stress-ng/pull/247>
|
|
|
|
diff --git a/test/test-pidfd-getfd.c b/test/test-pidfd-getfd.c
|
|
index d55b6f9a28692417..317c5542b2c423ee 100644
|
|
--- a/test/test-pidfd-getfd.c
|
|
+++ b/test/test-pidfd-getfd.c
|
|
@@ -20,6 +20,10 @@
|
|
|
|
#define _GNU_SOURCE
|
|
|
|
+#if defined(__has_include) && __has_include(<sys/pidfd.h>)
|
|
+#include <sys/pidfd.h>
|
|
+#endif
|
|
+
|
|
int main(void)
|
|
{
|
|
/* We don't care about the args, we just want to see if it links */
|