summaryrefslogtreecommitdiffstats
path: root/meta
diff options
context:
space:
mode:
authorKhem Raj <raj.khem@gmail.com>2016-03-17 05:18:20 +0000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2016-03-20 23:12:27 +0000
commite1f3f4cc3c2468cd8972a5fdf7ff7397edfead7a (patch)
tree69efe3aa6b60137da4cf5be90847d1a700e9a10f /meta
parentbb4e6e08e52e16110d1e59344f8240b56df11bb9 (diff)
downloadpoky-e1f3f4cc3c2468cd8972a5fdf7ff7397edfead7a.tar.gz
socat: Access c_ispeed and c_ospeed via APIs
make it more portable across libc implementations (From OE-Core rev: cd3408e7b845891b63de04249982330e02f13ee8) Signed-off-by: Khem Raj <raj.khem@gmail.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta')
-rw-r--r--meta/recipes-connectivity/socat/socat/0001-Access-c_ispeed-and-c_ospeed-via-APIs.patch39
-rw-r--r--meta/recipes-connectivity/socat/socat_1.7.3.1.bb1
2 files changed, 40 insertions, 0 deletions
diff --git a/meta/recipes-connectivity/socat/socat/0001-Access-c_ispeed-and-c_ospeed-via-APIs.patch b/meta/recipes-connectivity/socat/socat/0001-Access-c_ispeed-and-c_ospeed-via-APIs.patch
new file mode 100644
index 0000000000..367b48f113
--- /dev/null
+++ b/meta/recipes-connectivity/socat/socat/0001-Access-c_ispeed-and-c_ospeed-via-APIs.patch
@@ -0,0 +1,39 @@
1From 545d3dec8c91d6074516ffcfa79323ddf9d83839 Mon Sep 17 00:00:00 2001
2From: Khem Raj <raj.khem@gmail.com>
3Date: Tue, 15 Mar 2016 21:36:02 +0000
4Subject: [PATCH] Access c_ispeed and c_ospeed via APIs
5
6Use cfsetispeed(), cfsetospeed(), cfgetispeed, and cfgetospeed()
7instead of operating on c_ispeed and c_ospeed termios structure
8members directly because they are not guaranteed to exist on all
9libc implementations
10
11Signed-off-by: Khem Raj <raj.khem@gmail.com>
12---
13Upstream-Status: Submitted
14
15 xioinitialize.c | 8 ++++----
16 1 file changed, 4 insertions(+), 4 deletions(-)
17
18diff --git a/xioinitialize.c b/xioinitialize.c
19index 9f50155..632ca4c 100644
20--- a/xioinitialize.c
21+++ b/xioinitialize.c
22@@ -65,10 +65,10 @@ int xioinitialize(void) {
23 #if HAVE_TERMIOS_ISPEED && (ISPEED_OFFSET != -1) && (OSPEED_OFFSET != -1)
24 #if defined(ISPEED_OFFSET) && (ISPEED_OFFSET != -1)
25 #if defined(OSPEED_OFFSET) && (OSPEED_OFFSET != -1)
26- tdata.termarg.c_ispeed = 0x56789abc;
27- tdata.termarg.c_ospeed = 0x6789abcd;
28- assert(tdata.termarg.c_ispeed == tdata.speeds[ISPEED_OFFSET]);
29- assert(tdata.termarg.c_ospeed == tdata.speeds[OSPEED_OFFSET]);
30+ cfsetispeed(&tdata.termarg, 0x56789abc);
31+ cfsetospeed(&tdata.termarg, 0x6789abcd);
32+ assert(cfgetispeed(&tdata.termarg) == tdata.speeds[ISPEED_OFFSET]);
33+ assert(cfgetospeed(&tdata.termarg) == tdata.speeds[OSPEED_OFFSET]);
34 #endif
35 #endif
36 #endif
37--
381.9.1
39
diff --git a/meta/recipes-connectivity/socat/socat_1.7.3.1.bb b/meta/recipes-connectivity/socat/socat_1.7.3.1.bb
index b9a8a2fd15..6da9a17b35 100644
--- a/meta/recipes-connectivity/socat/socat_1.7.3.1.bb
+++ b/meta/recipes-connectivity/socat/socat_1.7.3.1.bb
@@ -15,6 +15,7 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263 \
15SRC_URI = "http://www.dest-unreach.org/socat/download/socat-${PV}.tar.bz2 \ 15SRC_URI = "http://www.dest-unreach.org/socat/download/socat-${PV}.tar.bz2 \
16 file://Makefile.in-fix-for-parallel-build.patch \ 16 file://Makefile.in-fix-for-parallel-build.patch \
17 file://0001-define-NETDB_INTERNAL-to-1-if-not-available.patch \ 17 file://0001-define-NETDB_INTERNAL-to-1-if-not-available.patch \
18 file://0001-Access-c_ispeed-and-c_ospeed-via-APIs.patch \
18" 19"
19 20
20SRC_URI[md5sum] = "334e46924f2b386299c9db2ac22bcd36" 21SRC_URI[md5sum] = "334e46924f2b386299c9db2ac22bcd36"