From 1ca100c2d2478cb8ef615edd1ad3cc2e1d90047b Mon Sep 17 00:00:00 2001 From: Baruch Siach Date: Tue, 1 Nov 2022 09:41:54 +0200 Subject: [PATCH] package/socat: fix printf feature detection socal configure uses AC_TRY_RUN to detect printf features. This does not work for cross compilation. All C libraries we use support C99 snprintf. Only glibc and uClibc support the deprecated Z modifier. These issues were noticed by an inspection of configure.ac. Signed-off-by: Baruch Siach Signed-off-by: Thomas Petazzoni --- package/socat/socat.mk | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/package/socat/socat.mk b/package/socat/socat.mk index e20577492d..c1bf4d260f 100644 --- a/package/socat/socat.mk +++ b/package/socat/socat.mk @@ -11,6 +11,14 @@ SOCAT_LICENSE = GPL-2.0 with OpenSSL exception SOCAT_LICENSE_FILES = README COPYING COPYING.OpenSSL SOCAT_CPE_ID_VENDOR = dest-unreach +SOCAT_CONF_ENV = ac_cv_have_c99_snprintf=yes + +ifeq ($(BR2_TOOLCHAIN_USES_GLIBC)$(BR2_TOOLCHAIN_USES_UCLIBC),y) +SOCAT_CONF_ENV += ac_cv_have_z_modifier=yes +else +SOCAT_CONF_ENV += ac_cv_have_z_modifier=no +endif + ifeq ($(BR2_powerpc)$(BR2_powerpc64)$(BR2_powerpc64le),y) SOCAT_CONF_ENV += \ sc_cv_sys_crdly_shift=12 \