]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
missing_sched: add CLONE_PIDFD
authorMichael Olbrich <m.olbrich@pengutronix.de>
Sun, 9 Feb 2025 12:32:36 +0000 (13:32 +0100)
committerLuca Boccassi <luca.boccassi@gmail.com>
Thu, 13 Feb 2025 15:54:46 +0000 (15:54 +0000)
CLONE_PIDFD was introduced in v5.2 and in sched.h in glibc-2.31 so
without this, building with older version fails with:

src/basic/raw-clone.h:41:108: error: 'CLONE_PIDFD' undeclared (first use in this function); did you mean 'CLONE_FILES'?

(cherry picked from commit e91c5cf06ab7ca9e5576c6feac5f743927f2b063)

src/basic/missing_sched.h
src/basic/raw-clone.h

index bbfc30cc8fb796705db68bef0bb8a98bc07e5d38..6e5e2b1e20bf6ee82d62d33639e962d364422cf3 100644 (file)
 assert_cc(CLONE_NEWCGROUP == 0x02000000);
 #endif
 
+/* b3e5838252665ee4cfa76b82bdf1198dca81e5be (5.2) */
+#ifndef CLONE_PIDFD
+#  define CLONE_PIDFD 0x00001000
+#else
+assert_cc(CLONE_PIDFD == 0x00001000);
+#endif
+
 /* 769071ac9f20b6a447410c7eaa55d1a5233ef40c (5.8) */
 #ifndef CLONE_NEWTIME
 #  define CLONE_NEWTIME 0x00000080
index 36202cc0ba4b41128928703f9374ce9e87c35f2e..91b0069fb5b7d1a4bd045c5554533449f0b3390c 100644 (file)
@@ -11,6 +11,7 @@
 
 #include "log.h"
 #include "macro.h"
+#include "missing_sched.h"
 #include "process-util.h"
 
 /**