systemd: bump version to 233
[buildroot-gz.git] / package / wiringpi / 0002-wiringPi-wiringSerial-fix-compile-for-missing-baud-d.patch
blobc9c4385d48bbcff8cdfe0537a0389ff5a121836c
1 From 1e7a7a625ca20633062406ce525b19d168c356af Mon Sep 17 00:00:00 2001
2 From: Peter Seiderer <ps.report@gmx.net>
3 Date: Mon, 20 Mar 2017 20:51:20 +0100
4 Subject: [PATCH] wiringPi/wiringSerial: fix compile for missing baud defines
6 For sparc-buildroot-linux-uclibc/sysroot/usr/include/asm/termbits.h
7 containing:
9 /* These have totally bogus values and nobody uses them
10 so far. Later on we'd have to use say 0x10000x and
11 adjust CBAUD constant and drivers accordingly.
12 #define B2500000 0x00001010
13 #define B3000000 0x00001011
14 #define B3500000 0x00001012
15 #define B4000000 0x00001013 */
17 Signed-off-by: Peter Seiderer <ps.report@gmx.net>
18 ---
19 wiringPi/wiringSerial.c | 8 ++++++++
20 1 file changed, 8 insertions(+)
22 diff --git a/wiringPi/wiringSerial.c b/wiringPi/wiringSerial.c
23 index e1587ad..4ac8d1e 100644
24 --- a/wiringPi/wiringSerial.c
25 +++ b/wiringPi/wiringSerial.c
26 @@ -75,10 +75,18 @@ int serialOpen (const char *device, const int baud)
27 case 1152000: myBaud = B1152000 ; break ;
28 case 1500000: myBaud = B1500000 ; break ;
29 case 2000000: myBaud = B2000000 ; break ;
30 +#if defined(B2500000)
31 case 2500000: myBaud = B2500000 ; break ;
32 +#endif
33 +#if defined(B3000000)
34 case 3000000: myBaud = B3000000 ; break ;
35 +#endif
36 +#if defined(B3500000)
37 case 3500000: myBaud = B3500000 ; break ;
38 +#endif
39 +#if defined(B4000000)
40 case 4000000: myBaud = B4000000 ; break ;
41 +#endif
43 default:
44 return -2 ;
45 --
46 2.11.0