aboutsummaryrefslogtreecommitdiffstats
path: root/testing/gpm/musl-fixes.patch
blob: 6653aaf475264ac6a4f6b11184d4e5315e47d563 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
From d88fb1de5803c366ab62f7de9ee5d83207fb2afe Mon Sep 17 00:00:00 2001
From: Dima Krasner <dima@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 */