summaryrefslogtreecommitdiff
path: root/libc/debian/patches/libc-add-cfsetspeed.patch
blob: 0bde23553d738b654dfbbd3cec03c54a8deb90d1 (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
65
66
67
Index: libc/usr/src/head/termios.h
===================================================================
--- libc.orig/usr/src/head/termios.h
+++ libc/usr/src/head/termios.h
@@ -36,6 +36,7 @@ __BEGIN_DECLS
 
 #if defined(_BSD_SOURCE) || defined(__EXTENSIONS__)
 void cfmakeraw (struct termios *);
+int cfsetspeed(struct termios *, speed_t);
 #endif
 
 __END_DECLS
Index: libc/usr/src/lib/libc/amd64/Makefile
===================================================================
--- libc.orig/usr/src/lib/libc/amd64/Makefile
+++ libc/usr/src/lib/libc/amd64/Makefile
@@ -360,6 +360,7 @@ PORTGEN=			\
 	cfgetispeed.o		\
 	cfgetospeed.o		\
 	cfmakeraw.o		\
+	cfsetspeed.o		\
 	cfree.o			\
 	cfsetispeed.o		\
 	cfsetospeed.o		\
Index: libc/usr/src/lib/libc/i386/Makefile.com
===================================================================
--- libc.orig/usr/src/lib/libc/i386/Makefile.com
+++ libc/usr/src/lib/libc/i386/Makefile.com
@@ -395,6 +395,7 @@ PORTGEN=			\
 	cfree.o			\
 	cfsetispeed.o		\
 	cfsetospeed.o		\
+	cfsetspeed.o		\
 	cftime.o		\
 	clock.o			\
 	closedir.o		\
Index: libc/usr/src/lib/libc/port/gen/cfsetspeed.c
===================================================================
--- /dev/null
+++ libc/usr/src/lib/libc/port/gen/cfsetspeed.c
@@ -0,0 +1,14 @@
+/*
+ * Public Domain.
+ */
+
+#include "termios.h"
+
+int cfsetspeed (struct termios *termios_p, speed_t speed)
+{
+  int rc;
+  rc = cfsetispeed (termios_p, speed);
+  if (0 == rc)
+    rc = cfsetospeed (termios_p, speed);
+  return rc;
+}
Index: libc/usr/src/lib/libc/port/mapfile-vers
===================================================================
--- libc.orig/usr/src/lib/libc/port/mapfile-vers
+++ libc/usr/src/lib/libc/port/mapfile-vers
@@ -268,6 +268,7 @@ SYMBOL_VERSION DYSON_1 {
         __gnu_timegm;
         _so_accept4;
         cfmakeraw;
+        cfsetspeed;
         error;
         error_at_line;
         error_message_count;