[Buildroot] [git commit] package/socat: fix printf feature detection
Thomas Petazzoni
thomas.petazzoni at bootlin.com
Sat Nov 5 22:46:02 UTC 2022
commit: https://git.buildroot.net/buildroot/commit/?id=1ca100c2d2478cb8ef615edd1ad3cc2e1d90047b
branch: https://git.buildroot.net/buildroot/commit/?id=refs/heads/master
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>
---
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