mirror of
git://git.openembedded.org/meta-openembedded
synced 2026-01-01 13:58:06 +00:00
autofs: Patch to build on musl
Signed-off-by: Khem Raj <raj.khem@gmail.com> Signed-off-by: Joe MacDonald <joe_macdonald@mentor.com>
This commit is contained in:
parent
423d6f08d0
commit
488214259d
|
|
@ -0,0 +1,50 @@
|
|||
From 933e065cf8aecfa0cce5f8f92abbed5baaaf3f77 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 1/2] 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>
|
||||
---
|
||||
include/automount.h | 8 ++++++++
|
||||
include/nsswitch.h | 3 +++
|
||||
2 files changed, 11 insertions(+)
|
||||
|
||||
diff --git a/include/automount.h b/include/automount.h
|
||||
index 219b07d..b12c22a 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 2b445a9..3db77b2 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 {
|
||||
--
|
||||
2.12.1
|
||||
|
||||
|
|
@ -0,0 +1,51 @@
|
|||
From 8fd74ddb3369572c594b22b396346131af00faee Mon Sep 17 00:00:00 2001
|
||||
From: Khem Raj <raj.khem@gmail.com>
|
||||
Date: Fri, 31 Mar 2017 19:12:10 -0700
|
||||
Subject: [PATCH 2/2] Replace __S_IEXEC with S_IEXEC
|
||||
|
||||
S_IEXEC is portable
|
||||
|
||||
Signed-off-by: Khem Raj <raj.khem@gmail.com>
|
||||
---
|
||||
daemon/lookup.c | 4 ++--
|
||||
modules/lookup_multi.c | 2 +-
|
||||
2 files changed, 3 insertions(+), 3 deletions(-)
|
||||
|
||||
diff --git a/daemon/lookup.c b/daemon/lookup.c
|
||||
index 62071df..1bec97f 100644
|
||||
--- a/daemon/lookup.c
|
||||
+++ b/daemon/lookup.c
|
||||
@@ -400,7 +400,7 @@ static int read_file_source_instance(struct autofs_point *ap, struct map_source
|
||||
if (!S_ISREG(st.st_mode))
|
||||
return NSS_STATUS_NOTFOUND;
|
||||
|
||||
- if (st.st_mode & __S_IEXEC)
|
||||
+ if (st.st_mode & S_IEXEC)
|
||||
type = src_prog;
|
||||
else
|
||||
type = src_file;
|
||||
@@ -890,7 +890,7 @@ static int lookup_name_file_source_instance(struct autofs_point *ap, struct map_
|
||||
if (!S_ISREG(st.st_mode))
|
||||
return NSS_STATUS_NOTFOUND;
|
||||
|
||||
- if (st.st_mode & __S_IEXEC)
|
||||
+ if (st.st_mode & S_IEXEC)
|
||||
type = src_prog;
|
||||
else
|
||||
type = src_file;
|
||||
diff --git a/modules/lookup_multi.c b/modules/lookup_multi.c
|
||||
index 6ec8434..88d081f 100644
|
||||
--- a/modules/lookup_multi.c
|
||||
+++ b/modules/lookup_multi.c
|
||||
@@ -104,7 +104,7 @@ static struct lookup_mod *nss_open_lookup(const char *format, int argc, const ch
|
||||
continue;
|
||||
}
|
||||
|
||||
- if (st.st_mode & __S_IEXEC)
|
||||
+ if (st.st_mode & S_IEXEC)
|
||||
type = src_prog;
|
||||
else
|
||||
type = src_file;
|
||||
--
|
||||
2.12.1
|
||||
|
||||
|
|
@ -5,6 +5,8 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=0636e73ff0215e8d672dc4c32c317bb3"
|
|||
|
||||
DEPENDS += "libtirpc flex-native bison-native"
|
||||
|
||||
CFLAGS_append_libc-musl = " -I${STAGING_INCDIR}/tirpc"
|
||||
|
||||
inherit autotools-brokensep systemd
|
||||
|
||||
SRC_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 \
|
|||
file://force-STRIP-to-emtpy.patch \
|
||||
file://remove-bashism.patch \
|
||||
file://fix-the-YACC-rule-to-fix-a-building-failure.patch \
|
||||
"
|
||||
file://0001-Define-__SWORD_TYPE-and-_PATH_NSSWITCH_CONF.patch \
|
||||
file://0002-Replace-__S_IEXEC-with-S_IEXEC.patch \
|
||||
"
|
||||
|
||||
SRC_URI[md5sum] = "e143df66b614b8cdb1ff533735f8e12d"
|
||||
SRC_URI[sha256sum] = "795419383b120d15699ab3b89ea0f3d029f6fb28405a83982d305c4b7b61130f"
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user