Skip to contentSkip to conversation

package/c-icap: memcached code needs <crypt.h>

PATCH In review Thomas Petazzoni via buildroot 4 participants 4 messages Jan 1, 2025 – Jan 8, 2025

lore
Share & tools
lore
#0 lore raw

PATCH 1/2 package/c-icap: memcached code needs <crypt.h>

The memcached code of c-icap needs <crypt.h>, which is no longer provided by glibc since glibc 2.39. So add some logic to add a dependency on libxcrypt when needed.

Fixes:

http://autobuild.buildroot.net/results/63b04f86bb8794b79d206659a883acef96dfebf0/

---
 package/c-icap/Config.in | 3 +++
 package/c-icap/c-icap.mk | 2 +-
 2 files changed, 4 insertions(+), 1 deletion(-)
package/c-icap/Config.in +3 -0
index 8f7963c26a..3c1325ee39 100644
@@ -3,6 +3,9 @@ config BR2_PACKAGE_C_ICAP
 	depends on !BR2_STATIC_LIBS
 	depends on BR2_TOOLCHAIN_HAS_THREADS
 	depends on BR2_USE_MMU # fork()
+	# the libmemcached code uses <crypt.h>
+	select BR2_PACKAGE_LIBXCRYPT if \
+	       BR2_PACKAGE_LIBMEMCACHED && BR2_TOOLCHAIN_USES_GLIBC
 	help
 	  c-icap is an implementation of an ICAP server. It can be
 	  used with HTTP proxies that support the ICAP protocol to
package/c-icap/c-icap.mk +1 -1
index 36ef1c8b12..4ece4c4b26 100644
@@ -43,7 +43,7 @@ endif
 
 ifeq ($(BR2_PACKAGE_LIBMEMCACHED),y)
 C_ICAP_CONF_OPTS += --with-memcached
-C_ICAP_DEPENDENCIES += libmemcached
+C_ICAP_DEPENDENCIES += libmemcached $(if $(BR2_PACKAGE_LIBXCRYPT),libxcrypt)
 else
 C_ICAP_CONF_OPTS += --without-memcached
 endif
Signature · 6 lines
2.47.1

_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
#1 lore raw

PATCH 2/2 package/c-icap: backport patch fixing missing <stdio.h> include

This commit backports an upstream patch that fixes a missing <stdio.h> include, causing build failures with toolchains based on GCC 14.x.

Fixes:

http://autobuild.buildroot.net/results/a99a9999fd417aa5edcd6302e674a72a99d89675466/

---
 ...ing-about-missing-stdio.h-include-fi.patch | 25 +++++++++++++++++++
 1 file changed, 25 insertions(+)
 create mode 100644 package/c-icap/0002-Fix-compile-warning-about-missing-stdio.h-include-fi.patch
package/c-icap/0002-Fix-compile-warning-about-missing-stdio.h-include-fi.patch new file +25 -0
new file mode 100644
index 0000000000..986ed43355
@@ -0,0 +1,25 @@
+From ae8a1bc4979c797bb1f152fc92cfe6bc05a44594 Mon Sep 17 00:00:00 2001
+From: Christos Tsantilas <[email protected]>
+Date: Tue, 20 Nov 2018 17:10:16 +0200
+Subject: [PATCH] Fix compile warning about missing stdio.h include file
+
+Signed-off-by: Thomas Petazzoni <[email protected]>
+Upstream: https://github.com/c-icap/c-icap-server/commit/ae8a1bc4979c797bb1f152fc92cfe6bc05a44594
+---
+ tests/test_base64.c | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/tests/test_base64.c b/tests/test_base64.c
+index 8a4a76c..7692197 100644
+--- a/tests/test_base64.c
++++ b/tests/test_base64.c
+@@ -1,5 +1,6 @@
+ #include "common.h"
+ #include "simple_api.h"
++#include <stdio.h>
+ 
+ 
+ int main(int argc, char *argv[])
+-- 
+2.47.1
+
Signature · 6 lines
2.47.1

_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
#2 lore raw
In reply to Thomas Petazzoni via buildroot
Quoted 10 lines · Thomas Petazzoni via buildroot

The memcached code of c-icap needs <crypt.h>, which is no longer provided by glibc since glibc 2.39. So add some logic to add a dependency on libxcrypt when needed.

Fixes:

http://autobuild.buildroot.net/results/63b04f86bb8794b79d206659a883acef96dfebf0/

Series applied to master, thanks.
_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot

#3 lore raw
In reply to Thomas Petazzoni via buildroot
Quoted 9 lines · Thomas Petazzoni via buildroot

The memcached code of c-icap needs <crypt.h>, which is no longer provided by glibc since glibc 2.39. So add some logic to add a dependency on libxcrypt when needed.

Fixes:

   http://autobuild.buildroot.net/results/63b04f86bb8794b79d206659a883acef96dfebf0/

Committed to 2024.11.x, thanks.

Signature · 5 lines
Bye, Peter Korsgaard
_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot