summaryrefslogtreecommitdiffstats
path: root/patches/systemd-223/0005-missing-define-O_PATH-and-AT_EMPTY_PATH.patch
blob: 881ccf44e5693b88c72af46dd89d2cca11387df1 (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
29
30
From: Michael Olbrich <m.olbrich@pengutronix.de>
Date: Tue, 2 Jun 2015 10:46:05 +0200
Subject: [PATCH] missing: define O_PATH and AT_EMPTY_PATH

This is required for glibc <= 2.15

Upstream requires glibc 2.16 but this is useful for host-systemd.

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

diff --git a/src/basic/missing.h b/src/basic/missing.h
index 48dfc511266d..98d0d49dade0 100644
--- a/src/basic/missing.h
+++ b/src/basic/missing.h
@@ -874,6 +874,12 @@ static inline int setns(int fd, int nstype) {
 #ifndef CLOCK_BOOTTIME_ALARM
 #define CLOCK_BOOTTIME_ALARM 9
 #endif
+#ifndef O_PATH
+#define O_PATH		010000000
+#endif
+#ifndef AT_EMPTY_PATH
+#define AT_EMPTY_PATH	0x1000	/* Allow empty relative pathname */
+#endif
 
 #ifndef IPV6_UNICAST_IF
 #define IPV6_UNICAST_IF 76