]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
BUILD: makefile: enable crypt(3) for OpenBSD
authorMatthieu Guegan <matthieu.guegan@deindeal.ch>
Fri, 20 Nov 2020 09:50:39 +0000 (10:50 +0100)
committerWilly Tarreau <w@1wt.eu>
Sat, 21 Nov 2020 04:45:05 +0000 (05:45 +0100)
Allow OpenBSD to support encrypted passwords in Userlists.

OpenBSD's crypt(3) function is provided directly by libc and does not
require -lcrypt.
Signed-off-by: Matthieu Guegan <matthieu.guegan@deindeal.ch>
Makefile

index ed0cdd51d6f545107a10d62a9e0fefacd96d7e51..b93b0a87235eccc78a943d171f9bb8b3c82fdc3f 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -390,8 +390,8 @@ endif
 # OpenBSD 6.3 and above
 ifeq ($(TARGET),openbsd)
   set_target_defaults = $(call default_opts, \
-    USE_POLL USE_TPROXY USE_THREAD USE_KQUEUE USE_ACCEPT4 USE_CLOSEFROM   \
-    USE_GETADDRINFO)
+    USE_POLL USE_TPROXY USE_LIBCRYPT USE_THREAD USE_KQUEUE USE_ACCEPT4        \
+    USE_CLOSEFROM USE_GETADDRINFO)
 endif
 
 # NetBSD 8 and above
@@ -493,10 +493,12 @@ BUILD_FEATURES := $(foreach opt,$(patsubst USE_%,%,$(use_opts)),$(if $(USE_$(opt
 OPTIONS_CFLAGS += $(foreach opt,$(use_opts),$(if $($(opt)),-D$(opt),))
 
 ifneq ($(USE_LIBCRYPT),)
+ifneq ($(TARGET),openbsd)
 ifneq ($(TARGET),osx)
 OPTIONS_LDFLAGS += -lcrypt
 endif
 endif
+endif
 
 ifneq ($(USE_SLZ),)
 # Use SLZ_INC and SLZ_LIB to force path to zlib.h and libz.{a,so} if needed.