aboutsummaryrefslogtreecommitdiff
path: root/package/vsftpd/vsftpd.mk
diff options
context:
space:
mode:
authorGravatar Maarten ter Huurne <maarten@treewalker.org>2014-09-16 15:17:30 +0200
committerGravatar Peter Korsgaard <peter@korsgaard.com>2014-10-12 09:32:15 +0200
commit9840261050c763824fc0691c2a15a7dae19f13f8 (patch)
tree51944135dad486cd564d61a9c60e7853fcd28a09 /package/vsftpd/vsftpd.mk
parentdf8ae412a44ec21d9928e8ba753adee7207d02bc (diff)
downloadbuildroot-9840261050c763824fc0691c2a15a7dae19f13f8.tar.gz
buildroot-9840261050c763824fc0691c2a15a7dae19f13f8.tar.bz2
vsftpd: Add build option to disable utmpx update code
This was modeled after a similar option for Dropbear. The utmpx code is automatically disabled when compiling with musl, to avoid a build error due to WTMPX_FILE being undefined. Note that musl has an empty utmpx implementation, so no functionality is lost by not calling it. [Peter: use positive logic] Signed-off-by: Maarten ter Huurne <maarten@treewalker.org> Tested-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com> Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
Diffstat (limited to 'package/vsftpd/vsftpd.mk')
-rw-r--r--package/vsftpd/vsftpd.mk8
1 files changed, 8 insertions, 0 deletions
diff --git a/package/vsftpd/vsftpd.mk b/package/vsftpd/vsftpd.mk
index 5801656265..cab5afb732 100644
--- a/package/vsftpd/vsftpd.mk
+++ b/package/vsftpd/vsftpd.mk
@@ -10,10 +10,18 @@ VSFTPD_LIBS = -lcrypt
VSFTPD_LICENSE = GPLv2
VSFTPD_LICENSE_FILES = COPYING
+define VSFTPD_DISABLE_UTMPX
+ $(SED) 's/.*VSF_BUILD_UTMPX/#undef VSF_BUILD_UTMPX/' $(@D)/builddefs.h
+endef
+
define VSFTPD_ENABLE_SSL
$(SED) 's/.*VSF_BUILD_SSL/#define VSF_BUILD_SSL/' $(@D)/builddefs.h
endef
+ifeq ($(BR2_PACKAGE_VSFTPD_UTMPX),)
+VSFTPD_POST_CONFIGURE_HOOKS += VSFTPD_DISABLE_UTMPX
+endif
+
ifeq ($(BR2_PACKAGE_OPENSSL),y)
VSFTPD_DEPENDENCIES += openssl
VSFTPD_LIBS += -lssl -lcrypto