summaryrefslogtreecommitdiffstats
path: root/meta-networking
diff options
context:
space:
mode:
authorKhem Raj <raj.khem@gmail.com>2017-03-31 19:14:53 -0700
committerJoe MacDonald <joe_macdonald@mentor.com>2017-04-25 15:55:37 -0400
commit488214259d17acfda308f821350630ea4ff359ae (patch)
tree550e208ff0908e373df57b1830250ffb40347025 /meta-networking
parent423d6f08d069c8dfbdbbb13951d296b3c6d985fd (diff)
downloadmeta-openembedded-488214259d17acfda308f821350630ea4ff359ae.tar.gz
autofs: Patch to build on musl
Signed-off-by: Khem Raj <raj.khem@gmail.com> Signed-off-by: Joe MacDonald <joe_macdonald@mentor.com>
Diffstat (limited to 'meta-networking')
-rw-r--r--meta-networking/recipes-daemons/autofs/autofs/0001-Define-__SWORD_TYPE-and-_PATH_NSSWITCH_CONF.patch50
-rw-r--r--meta-networking/recipes-daemons/autofs/autofs/0002-Replace-__S_IEXEC-with-S_IEXEC.patch51
-rw-r--r--meta-networking/recipes-daemons/autofs/autofs_5.1.1.bb6
3 files changed, 106 insertions, 1 deletions
diff --git a/meta-networking/recipes-daemons/autofs/autofs/0001-Define-__SWORD_TYPE-and-_PATH_NSSWITCH_CONF.patch b/meta-networking/recipes-daemons/autofs/autofs/0001-Define-__SWORD_TYPE-and-_PATH_NSSWITCH_CONF.patch
new file mode 100644
index 000000000..075af5707
--- /dev/null
+++ b/meta-networking/recipes-daemons/autofs/autofs/0001-Define-__SWORD_TYPE-and-_PATH_NSSWITCH_CONF.patch
@@ -0,0 +1,50 @@
1From 933e065cf8aecfa0cce5f8f92abbed5baaaf3f77 Mon Sep 17 00:00:00 2001
2From: Khem Raj <raj.khem@gmail.com>
3Date: Fri, 31 Mar 2017 19:10:57 -0700
4Subject: [PATCH 1/2] Define __SWORD_TYPE and _PATH_NSSWITCH_CONF
5
6if they are not defined as is in musl then define
7them here
8
9Signed-off-by: Khem Raj <raj.khem@gmail.com>
10---
11 include/automount.h | 8 ++++++++
12 include/nsswitch.h | 3 +++
13 2 files changed, 11 insertions(+)
14
15diff --git a/include/automount.h b/include/automount.h
16index 219b07d..b12c22a 100644
17--- a/include/automount.h
18+++ b/include/automount.h
19@@ -42,6 +42,14 @@
20
21 #define ENABLE_CORES 1
22
23+#ifndef __SWORD_TYPE
24+# if __WORDSIZE == 32 /* System word size */
25+# define __SWORD_TYPE int
26+# else /* __WORDSIZE == 64 */
27+# define __SWORD_TYPE long int
28+# endif
29+#endif
30+
31 /* We MUST have the paths to mount(8) and umount(8) */
32 #ifndef HAVE_MOUNT
33 #error Failed to locate mount(8)!
34diff --git a/include/nsswitch.h b/include/nsswitch.h
35index 2b445a9..3db77b2 100644
36--- a/include/nsswitch.h
37+++ b/include/nsswitch.h
38@@ -24,6 +24,9 @@
39 #include <netdb.h>
40 #include "list.h"
41
42+#ifndef _PATH_NSSWITCH_CONF
43+#define _PATH_NSSWITCH_CONF "/etc/nsswitch.conf"
44+#endif
45 #define NSSWITCH_FILE _PATH_NSSWITCH_CONF
46
47 enum nsswitch_status {
48--
492.12.1
50
diff --git a/meta-networking/recipes-daemons/autofs/autofs/0002-Replace-__S_IEXEC-with-S_IEXEC.patch b/meta-networking/recipes-daemons/autofs/autofs/0002-Replace-__S_IEXEC-with-S_IEXEC.patch
new file mode 100644
index 000000000..6b6ba6d85
--- /dev/null
+++ b/meta-networking/recipes-daemons/autofs/autofs/0002-Replace-__S_IEXEC-with-S_IEXEC.patch
@@ -0,0 +1,51 @@
1From 8fd74ddb3369572c594b22b396346131af00faee Mon Sep 17 00:00:00 2001
2From: Khem Raj <raj.khem@gmail.com>
3Date: Fri, 31 Mar 2017 19:12:10 -0700
4Subject: [PATCH 2/2] Replace __S_IEXEC with S_IEXEC
5
6S_IEXEC is portable
7
8Signed-off-by: Khem Raj <raj.khem@gmail.com>
9---
10 daemon/lookup.c | 4 ++--
11 modules/lookup_multi.c | 2 +-
12 2 files changed, 3 insertions(+), 3 deletions(-)
13
14diff --git a/daemon/lookup.c b/daemon/lookup.c
15index 62071df..1bec97f 100644
16--- a/daemon/lookup.c
17+++ b/daemon/lookup.c
18@@ -400,7 +400,7 @@ static int read_file_source_instance(struct autofs_point *ap, struct map_source
19 if (!S_ISREG(st.st_mode))
20 return NSS_STATUS_NOTFOUND;
21
22- if (st.st_mode & __S_IEXEC)
23+ if (st.st_mode & S_IEXEC)
24 type = src_prog;
25 else
26 type = src_file;
27@@ -890,7 +890,7 @@ static int lookup_name_file_source_instance(struct autofs_point *ap, struct map_
28 if (!S_ISREG(st.st_mode))
29 return NSS_STATUS_NOTFOUND;
30
31- if (st.st_mode & __S_IEXEC)
32+ if (st.st_mode & S_IEXEC)
33 type = src_prog;
34 else
35 type = src_file;
36diff --git a/modules/lookup_multi.c b/modules/lookup_multi.c
37index 6ec8434..88d081f 100644
38--- a/modules/lookup_multi.c
39+++ b/modules/lookup_multi.c
40@@ -104,7 +104,7 @@ static struct lookup_mod *nss_open_lookup(const char *format, int argc, const ch
41 continue;
42 }
43
44- if (st.st_mode & __S_IEXEC)
45+ if (st.st_mode & S_IEXEC)
46 type = src_prog;
47 else
48 type = src_file;
49--
502.12.1
51
diff --git a/meta-networking/recipes-daemons/autofs/autofs_5.1.1.bb b/meta-networking/recipes-daemons/autofs/autofs_5.1.1.bb
index 8d5559657..d85600e4c 100644
--- a/meta-networking/recipes-daemons/autofs/autofs_5.1.1.bb
+++ b/meta-networking/recipes-daemons/autofs/autofs_5.1.1.bb
@@ -5,6 +5,8 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=0636e73ff0215e8d672dc4c32c317bb3"
5 5
6DEPENDS += "libtirpc flex-native bison-native" 6DEPENDS += "libtirpc flex-native bison-native"
7 7
8CFLAGS_append_libc-musl = " -I${STAGING_INCDIR}/tirpc"
9
8inherit autotools-brokensep systemd 10inherit autotools-brokensep systemd
9 11
10SRC_URI = "${KERNELORG_MIRROR}/linux/daemons/autofs/v5/autofs-${PV}.tar.gz \ 12SRC_URI = "${KERNELORG_MIRROR}/linux/daemons/autofs/v5/autofs-${PV}.tar.gz \
@@ -21,7 +23,9 @@ SRC_URI = "${KERNELORG_MIRROR}/linux/daemons/autofs/v5/autofs-${PV}.tar.gz \
21 file://force-STRIP-to-emtpy.patch \ 23 file://force-STRIP-to-emtpy.patch \
22 file://remove-bashism.patch \ 24 file://remove-bashism.patch \
23 file://fix-the-YACC-rule-to-fix-a-building-failure.patch \ 25 file://fix-the-YACC-rule-to-fix-a-building-failure.patch \
24" 26 file://0001-Define-__SWORD_TYPE-and-_PATH_NSSWITCH_CONF.patch \
27 file://0002-Replace-__S_IEXEC-with-S_IEXEC.patch \
28 "
25 29
26SRC_URI[md5sum] = "e143df66b614b8cdb1ff533735f8e12d" 30SRC_URI[md5sum] = "e143df66b614b8cdb1ff533735f8e12d"
27SRC_URI[sha256sum] = "795419383b120d15699ab3b89ea0f3d029f6fb28405a83982d305c4b7b61130f" 31SRC_URI[sha256sum] = "795419383b120d15699ab3b89ea0f3d029f6fb28405a83982d305c4b7b61130f"