[Buildroot] [PATCH 10/10] hostapd: fix static build failure

Samuel Martin s.martin49 at gmail.com
Sat Jan 18 19:23:47 UTC 2014


When building statically hostapd with openssl support, it is necessary
to add -lz to LIBS to avoid undefined symbols when linking against
libcrypto.a.

Signed-off-by: Samuel Martin <s.martin49 at gmail.com>
---
 package/hostapd/hostapd.mk | 1 +
 1 file changed, 1 insertion(+)

diff --git a/package/hostapd/hostapd.mk b/package/hostapd/hostapd.mk
index 0fbd8bc..a978094 100644
--- a/package/hostapd/hostapd.mk
+++ b/package/hostapd/hostapd.mk
@@ -32,6 +32,7 @@ endef
 # Try to use openssl if it's already available
 ifeq ($(BR2_PACKAGE_OPENSSL),y)
 	HOSTAPD_DEPENDENCIES += openssl
+	HOSTAPD_LIBS += $(if $(BR2_PREFER_STATIC_LIB),-lcrypto -lz)
 define HOSTAPD_TLS_CONFIG
 	$(SED) 's/\(#\)\(CONFIG_TLS=openssl\)/\2/' $(HOSTAPD_CONFIG)
 	$(SED) 's/\(#\)\(CONFIG_EAP_PWD.*\)/\2/' $(HOSTAPD_CONFIG)
-- 
1.8.5.3




More information about the buildroot mailing list