Tags: patch * Helmut Grohne <hel...@subdivi.de> [2016-02-11 18:21:59 +0100]: > On Fri, Feb 05, 2016 at 12:43:53AM +0100, Szabolcs Nagy wrote: > > + This makes gpm compile against musl libc. > > I cannot reproduce this. Even after applying your patch, the build still > fails: > > prog/display-buttons.c:69:4: error: unknown type name 'fd_set' > > Can you update the patch and add the patch tag again? >
fixed.
diff -u gpm-1.20.4/debian/changelog gpm-1.20.4/debian/changelog --- gpm-1.20.4/debian/changelog +++ gpm-1.20.4/debian/changelog @@ -1,3 +1,14 @@ +gpm (1.20.4-6.2) UNRELEASED; urgency=medium + + * Non-maintainer upload. + * Use SA_NODEFER instead of its non-standard alias SA_NOMASK. + * Add missing sys/select.h and fcntl.h includes. + * Use standard sigemptyset unconditionally. + * Define SA_INTERRUPT if it's not defined (historical no-op). + * With these changes gpm builds against musl libc. + + -- <n...@port70.net> Fri, 12 Feb 2016 00:47:02 +0000 + gpm (1.20.4-6.1) unstable; urgency=low * Non-maintainer upload. only in patch2: unchanged: --- gpm-1.20.4.orig/src/lib/liblow.c +++ gpm-1.20.4/src/lib/liblow.c @@ -173,7 +173,7 @@ /* 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 */ @@ -350,7 +350,7 @@ /* if signal was originally ignored, job control is not supported */ if (gpm_saved_suspend_hook.sa_handler != SIG_IGN) { - sa.sa_flags = SA_NOMASK; + sa.sa_flags = SA_NODEFER; sa.sa_handler = gpm_suspend_hook; sigaction(SIGTSTP, &sa, 0); } only in patch2: unchanged: --- gpm-1.20.4.orig/src/prog/display-buttons.c +++ gpm-1.20.4/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, FD_ZERO */ #include <gpm.h> /* gpm information */ /* display resulting data */ only in patch2: unchanged: --- gpm-1.20.4.orig/src/prog/display-coords.c +++ gpm-1.20.4/src/prog/display-coords.c @@ -37,6 +37,7 @@ #include <stdio.h> /* printf() */ #include <time.h> /* time() */ #include <errno.h> /* errno */ +#include <sys/select.h> /* fd_set, FD_ZERO */ #include <gpm.h> /* gpm information */ /* display resulting data */ only in patch2: unchanged: --- gpm-1.20.4.orig/src/prog/gpm-root.y +++ gpm-1.20.4/src/prog/gpm-root.y @@ -1197,11 +1197,10 @@ LOG_DAEMON : LOG_USER); /* reap your zombies */ childaction.sa_handler=reap_children; -#if defined(__GLIBC__) - __sigemptyset(&childaction.sa_mask); -#else /* __GLIBC__ */ - childaction.sa_mask=0; -#endif /* __GLIBC__ */ + sigemptyset(&childaction.sa_mask); +#ifndef SA_INTERRUPT +#define SA_INTERRUPT 0 +#endif childaction.sa_flags=SA_INTERRUPT; /* need to break the select() call */ sigaction(SIGCHLD,&childaction,NULL); only in patch2: unchanged: --- gpm-1.20.4.orig/src/prog/open_console.c +++ gpm-1.20.4/src/prog/open_console.c @@ -22,6 +22,7 @@ #include "headers/message.h" /* messaging in gpm */ #include "headers/daemon.h" /* daemon internals */ #include <unistd.h> +#include <fcntl.h> int open_console(const int mode) {