From fa3df2b7d6e3debd96b022cece123c545bc568b2 Mon Sep 17 00:00:00 2001 From: Bernd Kuhls Date: Sun, 6 Jul 2025 08:44:14 +0200 Subject: [PATCH] package/ntp: fix OpenSSL detection Fixes: https://autobuild.buildroot.org/results/261e630f20dd20b7f606a7bcbd8fa7b50ce82fbe/ The build error occurs when libatomic is needed for linking. In ntp_openssl.m4 the result of OpenSSL's pkgconf was omitted. Enable configure option --enable-verbose-ssl to help future debugging: configure: ntp_ssl_libs_l: (-lssl -lcrypto -latomic) Signed-off-by: Bernd Kuhls Signed-off-by: Julien Olivain (cherry picked from commit 6a20660c5aefc804be21b1eeefacac8fbe973fe4) Signed-off-by: Thomas Perale --- package/ntp/0005-fix-openssl-configure.patch | 18 ++++++++++++++++++ package/ntp/ntp.mk | 2 +- 2 files changed, 19 insertions(+), 1 deletion(-) create mode 100644 package/ntp/0005-fix-openssl-configure.patch diff --git a/package/ntp/0005-fix-openssl-configure.patch b/package/ntp/0005-fix-openssl-configure.patch new file mode 100644 index 0000000000..0a213fcee6 --- /dev/null +++ b/package/ntp/0005-fix-openssl-configure.patch @@ -0,0 +1,18 @@ +Fix OpenSSL detection + +Upstream: https://bugs.ntp.org/show_bug.cgi?id=3985 + +Signed-off-by: Bernd Kuhls + +diff -uNr ntp-4.2.8p18.orig/sntp/m4/ntp_openssl.m4 ntp-4.2.8p18/sntp/m4/ntp_openssl.m4 +--- ntp-4.2.8p18.orig/sntp/m4/ntp_openssl.m4 2024-05-07 13:21:14.000000000 +0200 ++++ ntp-4.2.8p18/sntp/m4/ntp_openssl.m4 2025-07-06 08:37:14.140657598 +0200 +@@ -326,7 +326,7 @@ + not_found) ;; + *) + AC_MSG_NOTICE([Searching for libcrypto in $i]) +- LIBS="-L$i $NTPSSL_SAVED_LIBS" ++ LIBS="-L$i $ntp_ssl_libs_l $NTPSSL_SAVED_LIBS" + AC_CHECK_LIB( + [crypto], + [EVP_MD_CTX_new], diff --git a/package/ntp/ntp.mk b/package/ntp/ntp.mk index 1a7c7e7937..f481c5d79b 100644 --- a/package/ntp/ntp.mk +++ b/package/ntp/ntp.mk @@ -29,7 +29,7 @@ NTP_CONF_OPTS = \ NTP_AUTORECONF = YES ifeq ($(BR2_PACKAGE_OPENSSL),y) -NTP_CONF_OPTS += --with-crypto --enable-openssl-random +NTP_CONF_OPTS += --with-crypto --enable-openssl-random --enable-verbose-ssl NTP_DEPENDENCIES += openssl else NTP_CONF_OPTS += --without-crypto --disable-openssl-random