vsftpd: Fix build with musl

Signed-off-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Joe MacDonald <joe_macdonald@mentor.com>
This commit is contained in:
Khem Raj 2017-03-28 20:11:06 -07:00 committed by Joe MacDonald
parent d946331bc0
commit 764c7f46da
2 changed files with 32 additions and 3 deletions

View File

@ -0,0 +1,28 @@
From e55135c2a4ea7eae3cb1f4dccf69ca477ea095bf Mon Sep 17 00:00:00 2001
From: Khem Raj <raj.khem@gmail.com>
Date: Tue, 28 Mar 2017 20:09:12 -0700
Subject: [PATCH] sysdeputil.c: Fix with musl which does not have utmpx
Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
sysdeputil.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/sysdeputil.c b/sysdeputil.c
index 06f01f4..a8cff3b 100644
--- a/sysdeputil.c
+++ b/sysdeputil.c
@@ -58,7 +58,9 @@
#define VSF_SYSDEP_HAVE_SHADOW
#define VSF_SYSDEP_HAVE_USERSHELL
#define VSF_SYSDEP_HAVE_LIBCAP
-#define VSF_SYSDEP_HAVE_UTMPX
+#if defined(__GLIBC__)
+ #define VSF_SYSDEP_HAVE_UTMPX
+#endif
#define __USE_GNU
#include <utmpx.h>
--
2.12.1

View File

@ -19,7 +19,10 @@ SRC_URI = "https://security.appspot.com/downloads/vsftpd-${PV}.tar.gz \
file://vsftpd.service \
file://vsftpd-2.1.0-filter.patch \
file://0001-vsftpd-allow-sysinfo-in-the-seccomp-sandbox.patch \
"
${@bb.utils.contains('PACKAGECONFIG', 'tcp-wrappers', 'file://vsftpd-tcp_wrappers-support.patch', '', d)} \
${@bb.utils.contains('DISTRO_FEATURES', 'pam', '', '${NOPAM_SRC}', d)} \
file://0001-sysdeputil.c-Fix-with-musl-which-does-not-have-utmpx.patch \
"
LIC_FILES_CHKSUM = "file://COPYING;md5=a6067ad950b28336613aed9dd47b1271 \
file://COPYRIGHT;md5=04251b2eb0f298dae376d92454f6f72e \
@ -30,13 +33,11 @@ SRC_URI[sha256sum] = "9d4d2bf6e6e2884852ba4e69e157a2cecd68c5a7635d66a3a8cf8d898c
PACKAGECONFIG ??= "tcp-wrappers"
PACKAGECONFIG[tcp-wrappers] = ",,tcp-wrappers"
SRC_URI +="${@bb.utils.contains('PACKAGECONFIG', 'tcp-wrappers', 'file://vsftpd-tcp_wrappers-support.patch', '', d)}"
DEPENDS += "${@bb.utils.contains('DISTRO_FEATURES', 'pam', 'libpam', '', d)}"
RDEPENDS_${PN} += "${@bb.utils.contains('DISTRO_FEATURES', 'pam', 'pam-plugin-listfile', '', d)}"
PAMLIB = "${@bb.utils.contains('DISTRO_FEATURES', 'pam', '-L${STAGING_BASELIBDIR} -lpam', '', d)}"
NOPAM_SRC ="${@bb.utils.contains('PACKAGECONFIG', 'tcp-wrappers', 'file://nopam-with-tcp_wrappers.patch', 'file://nopam.patch', d)}"
SRC_URI += "${@bb.utils.contains('DISTRO_FEATURES', 'pam', '', '${NOPAM_SRC}', d)}"
inherit update-rc.d useradd systemd