From c26a6e19415633b2a264ca64f38fd6bc388f38c4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mat=C3=ADas=20Fonzo?= Date: Wed, 9 Aug 2017 20:05:57 -0300 Subject: [PATCH 1/3] redirect to as the GCC compiler suggest gcc -I/usr/src/gpm-1.20.7/src -DHAVE_CONFIG_H -include headers/config.h -Wall -DSYSCONFDIR="\"/etc\"" -DSBINDIR="\"/usr/sbin\"" -D_GNU_SOURCE -g -O2 -c -o daemon/gpm.o daemon/gpm.c In file included from daemon/gpm.c:32:0: /usr/include/sys/fcntl.h:1:2: warning: #warning redirecting incorrect #include to [-Wcpp] --- src/daemon/gpm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/daemon/gpm.c b/src/daemon/gpm.c index 771da5c..6806dce 100644 --- a/src/daemon/gpm.c +++ b/src/daemon/gpm.c @@ -29,7 +29,7 @@ #include /* SIGPIPE */ #include /* time() */ #include -#include /* O_RDONLY */ +#include /* O_RDONLY */ #include /* wait() */ #include /* mkdir() */ #include /* timeval */ From 54651a0962949c726bfcd582d6d5a33b147da456 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mat=C3=ADas=20Fonzo?= Date: Wed, 9 Aug 2017 20:27:12 -0300 Subject: [PATCH 2/3] Change path for missing headers of some progs/*.c Previously: for DEPS in `echo *.c */*.c`; do \ gcc -I. -I /usr/src/gpm-1.20.7/src -M -I/usr/src/gpm-1.20.7/src -DHAVE_CONFIG_H -include headers/config.h -Wall -DSYSCONFDIR="\"/etc\"" -DSBINDIR="\"/usr/sbin\"" -D_GNU_SOURCE $DEPS | \ /bin/sed 's/^\(.*\)\.o\([ :]+\)/\1.o \1.lo\2/g' >> .depend ; done prog/display-buttons.c:39:57: fatal error: gpm.h: No such file or directory #include /* gpm information */ ^ compilation terminated. prog/display-coords.c:40:57: fatal error: gpm.h: No such file or directory #include /* gpm information */ ^ compilation terminated. prog/get-versions.c:25:57: fatal error: gpm.h: No such file or directory #include /* gpm information */ ^ compilation terminated. --- src/prog/display-buttons.c | 2 +- src/prog/display-coords.c | 2 +- src/prog/get-versions.c | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/prog/display-buttons.c b/src/prog/display-buttons.c index 38d2f11..0db0289 100644 --- a/src/prog/display-buttons.c +++ b/src/prog/display-buttons.c @@ -37,7 +37,7 @@ #include /* time() */ #include /* errno */ #include /* fd_set and FD_* */ -#include /* gpm information */ +#include "headers/gpm.h" /* gpm information */ /* display resulting data */ int display_data(Gpm_Event *event, void *data) diff --git a/src/prog/display-coords.c b/src/prog/display-coords.c index 82afd12..7a8da4a 100644 --- a/src/prog/display-coords.c +++ b/src/prog/display-coords.c @@ -39,7 +39,7 @@ #include /* time() */ #include /* errno */ #include /* fd_set and FD_* */ -#include /* gpm information */ +#include "headers/gpm.h" /* gpm information */ /* display resulting data */ int display_data(Gpm_Event *event, void *data) diff --git a/src/prog/get-versions.c b/src/prog/get-versions.c index 00f1753..8b17e12 100644 --- a/src/prog/get-versions.c +++ b/src/prog/get-versions.c @@ -22,7 +22,7 @@ ********/ #include /* printf() */ -#include /* gpm information */ +#include "headers/gpm.h" /* gpm information */ int main() { From baeffb3a51f7fe041e239a8e0dd41b4dd77f5557 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mat=C3=ADas=20Fonzo?= Date: Thu, 3 Oct 2019 10:12:43 -0300 Subject: [PATCH 3/3] apply more fixes for musl from https://github.com/telmich/gpm/pull/30 --- src/daemon/old_main.c | 1 + src/lib/liblow.c | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/daemon/old_main.c b/src/daemon/old_main.c index 2581e26..ab7a87f 100644 --- a/src/daemon/old_main.c +++ b/src/daemon/old_main.c @@ -25,6 +25,7 @@ #include /* guess again */ #include /* guess again */ #include /* unlink */ +#include /* strcpy, bzero */ #include /* chmod */ #include /* linux hd* */ diff --git a/src/lib/liblow.c b/src/lib/liblow.c index e789d09..a2b59fc 100644 --- a/src/lib/liblow.c +++ b/src/lib/liblow.c @@ -33,7 +33,7 @@ #include /* socket() */ #include /* socket() */ #include /* struct sockaddr_un */ -#include /* O_RDONLY */ +#include /* O_RDONLY */ #include /* stat() */ #ifdef SIGTSTP /* true if BSD system */ @@ -173,7 +173,7 @@ static void gpm_suspend_hook (int signum) /* Reincarnation. Prepare for another death early. */ sigemptyset(&sa.sa_mask); sa.sa_handler = gpm_suspend_hook; - sa.sa_flags = SA_NOMASK; + sa.sa_flags = SA_NODEFER; sigaction (SIGTSTP, &sa, 0); /* Pop the gpm stack by closing the useless connection */