libsemanage: bump to version 2.5
[buildroot-gz.git] / package / lcdproc / 0002-musl.patch
blobd0425fd5b222fcbceb72f39aa353595d76fc190d
1 Fix musl build
3 Partly downloaded from
4 http://lists.omnipotent.net/pipermail/lcdproc/2015-November/014291.html
5 http://lists.omnipotent.net/pipermail/lcdproc/2015-November/014281.html
7 Signed-off-by: Bernd Kuhls <bernd.kuhls@t-online.de>
9 diff -uNr lcdproc-0.5.7.org/clients/lcdproc/machine.h lcdproc-0.5.7/clients/lcdproc/machine.h
10 --- lcdproc-0.5.7.org/clients/lcdproc/machine.h 2012-08-19 16:29:07.000000000 +0200
11 +++ lcdproc-0.5.7/clients/lcdproc/machine.h 2016-01-30 14:07:33.641802847 +0100
12 @@ -12,6 +12,7 @@
13 #ifndef _lcdproc_machine_h_
14 #define _lcdproc_machine_h_
16 +#include <time.h>
17 #include "shared/LL.h"
19 #ifndef LOADAVG_NSTATS
20 diff -uNr lcdproc-0.5.7.org/server/drivers/hd44780-pifacecad.c lcdproc-0.5.7/server/drivers/hd44780-pifacecad.c
21 --- lcdproc-0.5.7.org/server/drivers/hd44780-pifacecad.c 2014-03-23 11:22:09.000000000 +0100
22 +++ lcdproc-0.5.7/server/drivers/hd44780-pifacecad.c 2016-01-30 14:12:03.521279729 +0100
23 @@ -54,6 +54,7 @@
24 #include <unistd.h>
25 #include <fcntl.h>
26 #include <sys/ioctl.h>
27 +#include <linux/ioctl.h>
28 #include <stdint.h>
29 #include <linux/spi/spidev.h>
31 diff -uNr lcdproc-0.5.7.org/server/drivers/hd44780-rpi.c lcdproc-0.5.7/server/drivers/hd44780-rpi.c
32 --- lcdproc-0.5.7.org/server/drivers/hd44780-rpi.c 2014-03-23 11:22:09.000000000 +0100
33 +++ lcdproc-0.5.7/server/drivers/hd44780-rpi.c 2016-01-30 14:04:10.288112853 +0100
34 @@ -285,7 +285,7 @@
36 /* Unmap and free memory */
37 if (gpio_map != NULL)
38 - munmap((caddr_t) gpio_map, GPIO_BLOCK_SIZE);
39 + munmap((void *) gpio_map, GPIO_BLOCK_SIZE);
40 if (p->rpi_gpio != NULL)
41 free(p->rpi_gpio);
42 p->rpi_gpio = NULL;
43 diff -uNr lcdproc-0.5.7.org/server/drivers/hd44780-spi.c lcdproc-0.5.7/server/drivers/hd44780-spi.c
44 --- lcdproc-0.5.7.org/server/drivers/hd44780-spi.c 2014-03-23 11:22:09.000000000 +0100
45 +++ lcdproc-0.5.7/server/drivers/hd44780-spi.c 2016-01-30 14:11:11.604763500 +0100
46 @@ -29,6 +29,7 @@
47 #include <unistd.h>
48 #include <fcntl.h>
49 #include <sys/ioctl.h>
50 +#include <linux/ioctl.h>
51 #include <stdint.h>
52 #include <linux/spi/spidev.h>
54 diff -uNr lcdproc-0.5.7.org/server/drivers/mtc_s16209x.c lcdproc-0.5.7/server/drivers/mtc_s16209x.c
55 --- lcdproc-0.5.7.org/server/drivers/mtc_s16209x.c 2011-08-14 14:29:16.000000000 +0200
56 +++ lcdproc-0.5.7/server/drivers/mtc_s16209x.c 2016-01-30 14:13:10.691122839 +0100
57 @@ -49,6 +49,7 @@
58 #include <fcntl.h>
59 #include <string.h>
60 #include <errno.h>
61 +#include <sys/file.h>
63 #ifdef HAVE_CONFIG_H
64 # include "config.h"
65 diff -uNr lcdproc-0.5.7.org/server/drivers/rawserial.c lcdproc-0.5.7/server/drivers/rawserial.c
66 --- lcdproc-0.5.7.org/server/drivers/rawserial.c 2014-03-23 11:22:10.000000000 +0100
67 +++ lcdproc-0.5.7/server/drivers/rawserial.c 2016-01-30 14:03:43.465779507 +0100
68 @@ -60,13 +60,13 @@
69 /** \name Event loop timing. refresh_time and refresh_delta form the
70 * event loop timing mechanism for configurable update rates.
71 *@{*/
72 - uint refresh_time; /**< time at the last screen update */
73 - uint refresh_delta; /**< time step to next screen update */
74 + unsigned int refresh_time; /**< time at the last screen update */
75 + unsigned int refresh_delta; /**< time step to next screen update */
76 /**@}*/
77 } PrivateData;
79 /* Local prototypes */
80 -static uint get_millisecond_time(void);
81 +static unsigned int get_millisecond_time(void);
84 /* Vars for the server core */
85 @@ -303,7 +303,7 @@
86 PrivateData *p = drvthis->private_data;
87 char out[LCD_MAX_WIDTH * LCD_MAX_HEIGHT];
89 - uint currentTime = get_millisecond_time();
90 + unsigned int currentTime = get_millisecond_time();
91 int t_delta = currentTime - p->refresh_time;
94 @@ -415,7 +415,7 @@
96 * \return int with current millisecond time.
98 -static uint
99 +static unsigned int
100 get_millisecond_time(void)
102 struct timeval ts;