summaryrefslogtreecommitdiff
path: root/system/musl/0001-sysconf-Add-_SC_XOPEN_UUCP.patch
blob: d792ede57942a407eff44804ac542477ae2999d9 (plain) (blame)
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
31
32
33
34
35
36
37
38
39
From 6f592a7812de3190f567174bbb4baa40790831dd Mon Sep 17 00:00:00 2001
From: "A. Wilcox" <AWilcox@Wilcox-Tech.com>
Date: Wed, 11 Apr 2018 23:22:33 -0500
Subject: [PATCH 1/7] sysconf: Add _SC_XOPEN_UUCP

We definitely don't /support/ UUCP, so return -1 for it.
But this value is required to be present in <unistd.h>.
---
 include/unistd.h   | 1 +
 src/conf/sysconf.c | 1 +
 2 files changed, 2 insertions(+)

diff --git a/include/unistd.h b/include/unistd.h
index 9485da7a..2b88bbb2 100644
--- a/include/unistd.h
+++ b/include/unistd.h
@@ -417,6 +417,7 @@ int eaccess(const char *, int);
 #define _SC_XOPEN_STREAMS	246
 #define _SC_THREAD_ROBUST_PRIO_INHERIT	247
 #define _SC_THREAD_ROBUST_PRIO_PROTECT	248
+#define _SC_XOPEN_UUCP	249
 
 #define _CS_PATH	0
 #define _CS_POSIX_V6_WIDTH_RESTRICTED_ENVS	1
diff --git a/src/conf/sysconf.c b/src/conf/sysconf.c
index 9ce330a5..58830a09 100644
--- a/src/conf/sysconf.c
+++ b/src/conf/sysconf.c
@@ -164,6 +164,7 @@ long sysconf(int name)
 		[_SC_XOPEN_STREAMS] = JT_ZERO,
 		[_SC_THREAD_ROBUST_PRIO_INHERIT] = -1,
 		[_SC_THREAD_ROBUST_PRIO_PROTECT] = -1,
+		[_SC_XOPEN_UUCP] = -1,
 	};
 
 	if (name >= sizeof(values)/sizeof(values[0]) || !values[name]) {
-- 
2.15.0