summaryrefslogtreecommitdiffstats
path: root/patches/systemd-229/0003-missing-define-__NR_kcmp-if-necessary.patch
blob: e73fb7524578b0755aab8f5d1ece57280a1c9b0d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
From: Michael Olbrich <m.olbrich@pengutronix.de>
Date: Thu, 5 Mar 2015 10:33:25 +0100
Subject: [PATCH] missing: define __NR_kcmp if necessary

Needed for Kernel Headers < v3.5

Not for upstream, but needed for host-systemd.

Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
---
 src/basic/missing.h | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/src/basic/missing.h b/src/basic/missing.h
index 3d9ba1464608..34af717a7ce8 100644
--- a/src/basic/missing.h
+++ b/src/basic/missing.h
@@ -1079,6 +1079,10 @@ static inline int renameat2(int oldfd, const char *oldname, int newfd, const cha
 #define RENAME_NOREPLACE (1 << 0)
 #endif
 
+#ifndef __NR_kcmp
+# define __NR_kcmp 0xffffffff
+#endif
+
 #if !HAVE_DECL_KCMP
 static inline int kcmp(pid_t pid1, pid_t pid2, int type, unsigned long idx1, unsigned long idx2) {
 #if defined(__NR_kcmp)