[Buildroot] [git commit branch/2022.02.x] package/socat: fix printf feature detection

Peter Korsgaard peter at korsgaard.com
Mon Nov 14 19:36:14 UTC 2022


commit: https://git.buildroot.net/buildroot/commit/?id=06e37ff050c8c23ce507e831837f20e9df7b082d
branch: https://git.buildroot.net/buildroot/commit/?id=refs/heads/2022.02.x

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 <baruch at tkos.co.il>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni at bootlin.com>
(cherry picked from commit 1ca100c2d2478cb8ef615edd1ad3cc2e1d90047b)
Signed-off-by: Peter Korsgaard <peter at korsgaard.com>
---
 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 \



More information about the buildroot mailing list