The cirros image was rebuilt against the 3.13.0-83 kernel, drivers e1000e, igbvf...
[packages/trusty/cirros-testvm.git] / cirros-testvm / src-cirros / buildroot-2015.05 / package / gpm / 0001-Added-musl-support-to-libgpm-and-the-daemon.patch
1 From eb0e14f8a5c414603b2e882df54b9fec138104ec Mon Sep 17 00:00:00 2001
2 From: Dima Krasner <dima@dimakrasner.com>
3 Date: Wed, 12 Nov 2014 23:06:46 +0200
4 Subject: [PATCH] Added musl support to libgpm and the daemon.
5
6 [Upstream patch backported from the github repository,
7 https://github.com/telmich/gpm/commit/d88fb1de5803c366ab62f7de9ee5d83207fb2afe.]
8
9 Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
10 ---
11  src/daemon/open_console.c  | 1 +
12  src/prog/display-buttons.c | 1 +
13  src/prog/display-coords.c  | 1 +
14  src/prog/gpm-root.y        | 4 ++--
15  4 files changed, 5 insertions(+), 2 deletions(-)
16
17 diff --git a/src/daemon/open_console.c b/src/daemon/open_console.c
18 index 98297c9..4d6c0af 100644
19 --- a/src/daemon/open_console.c
20 +++ b/src/daemon/open_console.c
21 @@ -21,6 +21,7 @@
22  
23  #include <fcntl.h>                  /* open and co.      */
24  #include <sys/stat.h>               /* stat()            */
25 +#include <sys/types.h>              /* major()           */
26  #include <sys/ioctl.h>              /* ioctl             */
27  
28  /* Linux specific (to be outsourced in gpm2 */
29 diff --git a/src/prog/display-buttons.c b/src/prog/display-buttons.c
30 index de8e5b2..38d2f11 100644
31 --- a/src/prog/display-buttons.c
32 +++ b/src/prog/display-buttons.c
33 @@ -36,6 +36,7 @@
34  #include <stdio.h>            /* printf()             */
35  #include <time.h>             /* time()               */
36  #include <errno.h>            /* errno                */
37 +#include <sys/select.h>       /* fd_set and FD_*      */
38  #include <gpm.h>              /* gpm information      */
39  
40  /* display resulting data */
41 diff --git a/src/prog/display-coords.c b/src/prog/display-coords.c
42 index ed15c8a..411283a 100644
43 --- a/src/prog/display-coords.c
44 +++ b/src/prog/display-coords.c
45 @@ -37,6 +37,7 @@
46  #include <stdio.h>            /* printf()             */
47  #include <time.h>             /* time()               */
48  #include <errno.h>            /* errno                */
49 +#include <sys/select.h>       /* fd_set and FD_*      */
50  #include <gpm.h>              /* gpm information      */
51  
52  /* display resulting data */
53 diff --git a/src/prog/gpm-root.y b/src/prog/gpm-root.y
54 index 069d801..188ae35 100644
55 --- a/src/prog/gpm-root.y
56 +++ b/src/prog/gpm-root.y
57 @@ -1199,9 +1199,9 @@ int main(int argc, char **argv)
58  #if defined(__GLIBC__)
59     __sigemptyset(&childaction.sa_mask);
60  #else /* __GLIBC__ */
61 -   childaction.sa_mask=0;
62 +   sigemptyset(&childaction.sa_mask);
63  #endif /* __GLIBC__ */
64 -   childaction.sa_flags=SA_INTERRUPT; /* need to break the select() call */
65 +   childaction.sa_flags=0;
66     sigaction(SIGCHLD,&childaction,NULL);
67  
68     /*....................................... Connect and get your buffer */
69 -- 
70 2.1.0
71