From e6b576c8bd542f46c03a4b8fdc345604b3833a81 Mon Sep 17 00:00:00 2001
From: Michael Olbrich <m.olbrich@pengutronix.de>
Date: Sun, 9 Feb 2025 13:32:36 +0100
Subject: [PATCH 1111/1160] missing_sched: add CLONE_PIDFD
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)
(cherry picked from commit 480e39dbbb3df253e02a4908dfcfecf1fb3511e2)
(cherry picked from commit 5e0588e3d97715da9995013eb8dbc13eb21a8d0b)
src/basic/missing_sched.h | 7 +++++++
src/basic/raw-clone.h | 1 +
2 files changed, 8 insertions(+)
@@ -8,6 +8,13 @@
#define 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
@@ -11,6 +11,7 @@
#include "log.h"
#include "macro.h"
+#include "missing_sched.h"
#include "process-util.h"
/**
--
2.33.0