buildroot/package/gpm/0005-fix-building-w-newer-glibc.patch
Fabrice Fontaine 50b18ed68c package/gpm: fix musl build with gcc 14
Fix the following musl build failure with gcc 14:

daemon/old_main.c: In function 'old_main':
daemon/old_main.c:56:11: error: implicit declaration of function 'strcmp' [-Wimplicit-function-declaration]
   56 |       if(!strcmp((which_mouse->opt_dev),"-")) fd=0; /* use stdin */
      |           ^~~~~~
daemon/old_main.c:35:1: note: include '<string.h>' or provide a declaration of 'strcmp'
   34 | #include "headers/gpmInt.h"         /* daemon internals */
  +++ |+#include <string.h>
   35 |

While at it, add Upstream tags to other patches

Fixes:
 - http://autobuild.buildroot.org/results/3192740863d57e72e90e622683e7b9fcc057fa8b

Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
2024-07-12 17:12:28 +02:00

34 lines
1.1 KiB
Diff

From b350aee4ea5785a75cb6ad770f6b768c506ebb70 Mon Sep 17 00:00:00 2001
From: Mike Frysinger <vapier@gentoo.org>
Date: Mon, 14 Mar 2016 15:39:54 -0400
Subject: [PATCH] fix building w/newer glibc
Linux C libraries are looking to disentangle sysmacros.h from the
sys/types.h include, so make sure we pull in the header when it is
found.
Upstream: https://github.com/telmich/gpm/commit/b350aee4ea5785a75cb6ad770f6b768c506ebb70
Signed-off-by: Giulio Benetti <giulio.benetti@micronovasrl.com>
---
src/daemon/open_console.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/src/daemon/open_console.c b/src/daemon/open_console.c
index 4d6c0af..6dd43e6 100644
--- a/src/daemon/open_console.c
+++ b/src/daemon/open_console.c
@@ -24,6 +24,10 @@
#include <sys/types.h> /* major() */
#include <sys/ioctl.h> /* ioctl */
+#ifdef HAVE_SYS_SYSMACROS_H
+#include <sys/sysmacros.h> /* major() w/newer glibc */
+#endif
+
/* Linux specific (to be outsourced in gpm2 */
#include <linux/serial.h> /* for serial console check */
#include <asm/ioctls.h> /* for serial console check */
--
2.17.1