2
1

0001-src-file.c-fix-build-without-wide-support.patch 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839
  1. From f2ab09d0e1388657f6b7e62bacc383ebea91f5b9 Mon Sep 17 00:00:00 2001
  2. From: Fabrice Fontaine <fontaine.fabrice@gmail.com>
  3. Date: Wed, 26 Oct 2022 00:23:32 +0200
  4. Subject: [PATCH] src/file.c: fix build without wide support
  5. Fix the following build failure without wide support (e.g. on uclibc)
  6. raised since version 5.43 and
  7. https://github.com/file/file/commit/c80065fe6900be5e794941e29b32440e9969b1c3:
  8. file.c: In function 'fname_print':
  9. file.c:605:10: error: macro "putc" requires 2 arguments, but only 1 given
  10. 605 | putc(c);
  11. | ^
  12. Fixes:
  13. - http://autobuild.buildroot.org/results/7ff1dd9f79408d2e6286c005302b6f3c505ab259
  14. Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
  15. [Upstream status: https://bugs.astron.com/view.php?id=398]
  16. ---
  17. src/file.c | 2 +-
  18. 1 file changed, 1 insertion(+), 1 deletion(-)
  19. diff --git a/src/file.c b/src/file.c
  20. index f5f46524..1c23defc 100644
  21. --- a/src/file.c
  22. +++ b/src/file.c
  23. @@ -615,7 +615,7 @@ fname_print(const char *inname)
  24. for (i = 0; i < n; i++) {
  25. unsigned char c = CAST(unsigned char, inname[i]);
  26. if (isprint(c)) {
  27. - putc(c);
  28. + putc(c, stdout);
  29. continue;
  30. }
  31. file_octal(c);
  32. --
  33. 2.35.1