[packages/gpm] upstream fixes for new glibc

atler atler at pld-linux.org
Wed Apr 29 12:01:53 CEST 2020


commit b9a5fde9d80ac54e857b21cc26f93cd4a688bc90
Author: Jan Palus <atler at pld-linux.org>
Date:   Wed Apr 29 10:01:06 2020 +0000

    upstream fixes for new glibc

 glibc.patch | 120 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 gpm.spec    |   2 +
 2 files changed, 122 insertions(+)
---
diff --git a/gpm.spec b/gpm.spec
index b85bb68..5749d31 100644
--- a/gpm.spec
+++ b/gpm.spec
@@ -33,6 +33,7 @@ Patch4:		%{name}-dont_display_stupid_error_messages.patch
 Patch5:		%{name}-ncursesw.patch
 Patch6:		close-fds.patch
 Patch7:		format-string.patch
+Patch8:		glibc.patch
 URL:		http://www.nico.schottelius.org/software/gpm/
 BuildRequires:	autoconf >= 2.61
 BuildRequires:	automake
@@ -240,6 +241,7 @@ Pliki trybu GPM dla Emacsa.
 %patch5 -p1
 %patch6 -p1
 %patch7 -p1
+%patch8 -p1
 
 %{__sed} -i -e '1s#/usr/bin/awk#/bin/awk#' doc/manpager
 
diff --git a/glibc.patch b/glibc.patch
new file mode 100644
index 0000000..ad31e0b
--- /dev/null
+++ b/glibc.patch
@@ -0,0 +1,120 @@
+From b350aee4ea5785a75cb6ad770f6b768c506ebb70 Mon Sep 17 00:00:00 2001
+From: Mike Frysinger <vapier at 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.
+---
+ 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 */
+From d88fb1de5803c366ab62f7de9ee5d83207fb2afe Mon Sep 17 00:00:00 2001
+From: Dima Krasner <dima at dimakrasner.com>
+Date: Wed, 12 Nov 2014 23:06:46 +0200
+Subject: [PATCH] Added musl support to libgpm and the daemon.
+
+---
+ src/daemon/open_console.c  | 1 +
+ src/prog/display-buttons.c | 1 +
+ src/prog/display-coords.c  | 1 +
+ src/prog/gpm-root.y        | 4 ++--
+ 4 files changed, 5 insertions(+), 2 deletions(-)
+
+diff --git a/src/daemon/open_console.c b/src/daemon/open_console.c
+index 98297c9..4d6c0af 100644
+--- a/src/daemon/open_console.c
++++ b/src/daemon/open_console.c
+@@ -21,6 +21,7 @@
+ 
+ #include <fcntl.h>                  /* open and co.      */
+ #include <sys/stat.h>               /* stat()            */
++#include <sys/types.h>              /* major()           */
+ #include <sys/ioctl.h>              /* ioctl             */
+ 
+ /* Linux specific (to be outsourced in gpm2 */
+diff --git a/src/prog/display-buttons.c b/src/prog/display-buttons.c
+index de8e5b2..38d2f11 100644
+--- a/src/prog/display-buttons.c
++++ b/src/prog/display-buttons.c
+@@ -36,6 +36,7 @@
+ #include <stdio.h>            /* printf()             */
+ #include <time.h>             /* time()               */
+ #include <errno.h>            /* errno                */
++#include <sys/select.h>       /* fd_set and FD_*      */
+ #include <gpm.h>              /* gpm information      */
+ 
+ /* display resulting data */
+diff --git a/src/prog/display-coords.c b/src/prog/display-coords.c
+index 1fb810f..82afd12 100644
+--- a/src/prog/display-coords.c
++++ b/src/prog/display-coords.c
+@@ -38,6 +38,7 @@
+ #include <stdio.h>            /* printf()             */
+ #include <time.h>             /* time()               */
+ #include <errno.h>            /* errno                */
++#include <sys/select.h>       /* fd_set and FD_*      */
+ #include <gpm.h>              /* gpm information      */
+ 
+ /* display resulting data */
+diff --git a/src/prog/gpm-root.y b/src/prog/gpm-root.y
+index 069d801..188ae35 100644
+--- a/src/prog/gpm-root.y
++++ b/src/prog/gpm-root.y
+@@ -1199,9 +1199,9 @@ int main(int argc, char **argv)
+ #if defined(__GLIBC__)
+    __sigemptyset(&childaction.sa_mask);
+ #else /* __GLIBC__ */
+-   childaction.sa_mask=0;
++   sigemptyset(&childaction.sa_mask);
+ #endif /* __GLIBC__ */
+-   childaction.sa_flags=SA_INTERRUPT; /* need to break the select() call */
++   childaction.sa_flags=0;
+    sigaction(SIGCHLD,&childaction,NULL);
+ 
+    /*....................................... Connect and get your buffer */
+From fdc42770596e25749f7e2ce0ea97882177397167 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem at gmail.com>
+Date: Sun, 25 Jun 2017 07:25:33 -0700
+Subject: [PATCH] Use sigemptyset API instead of __sigemptyset
+
+__sigemptyset has been removed from glibc public
+API headers in upcoming (2.26) release onwards
+
+Signed-off-by: Khem Raj <raj.khem at gmail.com>
+---
+ src/prog/gpm-root.y | 4 ----
+ 1 file changed, 4 deletions(-)
+
+diff --git a/src/prog/gpm-root.y b/src/prog/gpm-root.y
+index 5126c65..76c896c 100644
+--- a/src/prog/gpm-root.y
++++ b/src/prog/gpm-root.y
+@@ -1196,11 +1196,7 @@ int main(int argc, char **argv)
+                                                         LOG_DAEMON : LOG_USER);
+    /* reap your zombies */
+    childaction.sa_handler=reap_children;
+-#if defined(__GLIBC__)
+-   __sigemptyset(&childaction.sa_mask);
+-#else /* __GLIBC__ */
+    sigemptyset(&childaction.sa_mask);
+-#endif /* __GLIBC__ */
+    childaction.sa_flags=0;
+    sigaction(SIGCHLD,&childaction,NULL);
+ 
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/gpm.git/commitdiff/b9a5fde9d80ac54e857b21cc26f93cd4a688bc90



More information about the pld-cvs-commit mailing list