aboutsummaryrefslogtreecommitdiffstats
path: root/meta-networking/recipes-daemons/autofs/autofs/0001-Define-__SWORD_TYPE-and-_PATH_NSSWITCH_CONF.patch
blob: 6128f3d0ed97fee40601271d7e900b2629d593c6 (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
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
From 987c8f4a718cdd6b764592ba7510090a59623959 Mon Sep 17 00:00:00 2001
From: Khem Raj <raj.khem@gmail.com>
Date: Fri, 31 Mar 2017 19:10:57 -0700
Subject: [PATCH] Define __SWORD_TYPE and _PATH_NSSWITCH_CONF

if they are not defined as is in musl then define
them here

Signed-off-by: Khem Raj <raj.khem@gmail.com>

---
Upstream-Status: Pending

 include/automount.h | 8 ++++++++
 include/nsswitch.h  | 3 +++
 2 files changed, 11 insertions(+)

diff --git a/include/automount.h b/include/automount.h
index cc336ad..8bdcf12 100644
--- a/include/automount.h
+++ b/include/automount.h
@@ -42,6 +42,14 @@
 
 #define ENABLE_CORES	1
 
+#ifndef __SWORD_TYPE
+# if __WORDSIZE == 32  /* System word size */
+#  define __SWORD_TYPE int
+# else /* __WORDSIZE == 64 */
+#  define __SWORD_TYPE long int
+# endif
+#endif
+
 /* We MUST have the paths to mount(8) and umount(8) */
 #ifndef HAVE_MOUNT
 #error Failed to locate mount(8)!
diff --git a/include/nsswitch.h b/include/nsswitch.h
index d3e4027..7a0c38f 100644
--- a/include/nsswitch.h
+++ b/include/nsswitch.h
@@ -24,6 +24,9 @@
 #include <netdb.h>
 #include "list.h"
 
+#ifndef _PATH_NSSWITCH_CONF
+#define _PATH_NSSWITCH_CONF     "/etc/nsswitch.conf"
+#endif
 #define NSSWITCH_FILE _PATH_NSSWITCH_CONF
 
 enum nsswitch_status {