[Buildroot] [git commit] package/file: fix uclibc build

Thomas Petazzoni thomas.petazzoni at bootlin.com
Wed Oct 26 11:57:59 UTC 2022


commit: https://git.buildroot.net/buildroot/commit/?id=d69752c7582a0b1dd14d05f46fa7a22b2bcfb530
branch: https://git.buildroot.net/buildroot/commit/?id=refs/heads/master

Fix the following uclibc build failure raised since bump to version 5.43
in commit f17b56f1aa43361eff4a81538a61e34c509ebb70 and
https://github.com/file/file/commit/c80065fe6900be5e794941e29b32440e9969b1c3:

file.c: In function 'fname_print':
file.c:605:10: error: macro "putc" requires 2 arguments, but only 1 given
  605 |    putc(c);
      |          ^

Fixes:
 - http://autobuild.buildroot.org/results/7ff1dd9f79408d2e6286c005302b6f3c505ab259

Signed-off-by: Fabrice Fontaine <fontaine.fabrice at gmail.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni at bootlin.com>
---
 ...src-file.c-fix-build-without-wide-support.patch | 39 ++++++++++++++++++++++
 1 file changed, 39 insertions(+)

diff --git a/package/file/0001-src-file.c-fix-build-without-wide-support.patch b/package/file/0001-src-file.c-fix-build-without-wide-support.patch
new file mode 100644
index 0000000000..29be9fa2cd
--- /dev/null
+++ b/package/file/0001-src-file.c-fix-build-without-wide-support.patch
@@ -0,0 +1,39 @@
+From f2ab09d0e1388657f6b7e62bacc383ebea91f5b9 Mon Sep 17 00:00:00 2001
+From: Fabrice Fontaine <fontaine.fabrice at gmail.com>
+Date: Wed, 26 Oct 2022 00:23:32 +0200
+Subject: [PATCH] src/file.c: fix build without wide support
+
+Fix the following build failure without wide support (e.g. on uclibc)
+raised since version 5.43 and
+https://github.com/file/file/commit/c80065fe6900be5e794941e29b32440e9969b1c3:
+
+file.c: In function 'fname_print':
+file.c:605:10: error: macro "putc" requires 2 arguments, but only 1 given
+  605 |    putc(c);
+      |          ^
+
+Fixes:
+ - http://autobuild.buildroot.org/results/7ff1dd9f79408d2e6286c005302b6f3c505ab259
+
+Signed-off-by: Fabrice Fontaine <fontaine.fabrice at gmail.com>
+[Upstream status: https://bugs.astron.com/view.php?id=398]
+---
+ src/file.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/src/file.c b/src/file.c
+index f5f46524..1c23defc 100644
+--- a/src/file.c
++++ b/src/file.c
+@@ -615,7 +615,7 @@ fname_print(const char *inname)
+ 	for (i = 0; i < n; i++) {
+ 		unsigned char c = CAST(unsigned char, inname[i]);
+ 		if (isprint(c)) {
+-			putc(c);
++			putc(c, stdout);
+ 			continue;
+ 		}
+ 		file_octal(c);
+-- 
+2.35.1
+



More information about the buildroot mailing list