On Tue, Apr 12, 2016 at 10:00 AM, Bruce Ashfield <[email protected]> wrote: > > > On Thu, Mar 17, 2016 at 1:18 AM, Khem Raj <[email protected]> wrote: >> >> make it more portable across libc implementations >> >> Signed-off-by: Khem Raj <[email protected]> >> --- >> ...001-Access-c_ispeed-and-c_ospeed-via-APIs.patch | 39 >> ++++++++++++++++++++++ >> meta/recipes-connectivity/socat/socat_1.7.3.1.bb | 1 + >> 2 files changed, 40 insertions(+) >> create mode 100644 >> meta/recipes-connectivity/socat/socat/0001-Access-c_ispeed-and-c_ospeed-via-APIs.patch >> >> 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 0000000..367b48f >> --- /dev/null >> +++ >> b/meta/recipes-connectivity/socat/socat/0001-Access-c_ispeed-and-c_ospeed-via-APIs.patch >> @@ -0,0 +1,39 @@ >> +From 545d3dec8c91d6074516ffcfa79323ddf9d83839 Mon Sep 17 00:00:00 2001 >> +From: Khem Raj <[email protected]> >> +Date: Tue, 15 Mar 2016 21:36:02 +0000 >> +Subject: [PATCH] Access c_ispeed and c_ospeed via APIs >> + >> +Use cfsetispeed(), cfsetospeed(), cfgetispeed, and cfgetospeed() >> +instead of operating on c_ispeed and c_ospeed termios structure >> +members directly because they are not guaranteed to exist on all >> +libc implementations > > > I finally bisected a runtime failure on my container platform to this > change. I'm now > failing the new assertion, where I wasn't failing before this was added: > > socat-1.7.3.1/xioinitialize.c:70: xioinitialize: Assertion > `cfgetispeed(&tdata.termarg) == tdata.speeds[ISPEED_OFFSET]' failed. >
this is a benign change. Have you root caused it before you try to revert it > I can revert this in my own layers, but what's the best way forward to get > this > fixed in core ? > > khem: This says it is submitted upstream, did it get accepted ? I can follow > up on the socat > list if it merged there as well. > > Bruce > >> >> + >> +Signed-off-by: Khem Raj <[email protected]> >> +--- >> +Upstream-Status: Submitted >> + >> + xioinitialize.c | 8 ++++---- >> + 1 file changed, 4 insertions(+), 4 deletions(-) >> + >> +diff --git a/xioinitialize.c b/xioinitialize.c >> +index 9f50155..632ca4c 100644 >> +--- a/xioinitialize.c >> ++++ b/xioinitialize.c >> +@@ -65,10 +65,10 @@ int xioinitialize(void) { >> + #if HAVE_TERMIOS_ISPEED && (ISPEED_OFFSET != -1) && (OSPEED_OFFSET != >> -1) >> + #if defined(ISPEED_OFFSET) && (ISPEED_OFFSET != -1) >> + #if defined(OSPEED_OFFSET) && (OSPEED_OFFSET != -1) >> +- tdata.termarg.c_ispeed = 0x56789abc; >> +- tdata.termarg.c_ospeed = 0x6789abcd; >> +- assert(tdata.termarg.c_ispeed == tdata.speeds[ISPEED_OFFSET]); >> +- assert(tdata.termarg.c_ospeed == tdata.speeds[OSPEED_OFFSET]); >> ++ cfsetispeed(&tdata.termarg, 0x56789abc); >> ++ cfsetospeed(&tdata.termarg, 0x6789abcd); >> ++ assert(cfgetispeed(&tdata.termarg) == >> tdata.speeds[ISPEED_OFFSET]); >> ++ assert(cfgetospeed(&tdata.termarg) == >> tdata.speeds[OSPEED_OFFSET]); >> + #endif >> + #endif >> + #endif >> +-- >> +1.9.1 >> + >> 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 b9a8a2f..6da9a17 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 \ >> SRC_URI = "http://www.dest-unreach.org/socat/download/socat-${PV}.tar.bz2 >> \ >> file://Makefile.in-fix-for-parallel-build.patch \ >> file://0001-define-NETDB_INTERNAL-to-1-if-not-available.patch >> \ >> + file://0001-Access-c_ispeed-and-c_ospeed-via-APIs.patch \ >> " >> >> SRC_URI[md5sum] = "334e46924f2b386299c9db2ac22bcd36" >> -- >> 1.9.1 >> >> -- >> _______________________________________________ >> Openembedded-core mailing list >> [email protected] >> http://lists.openembedded.org/mailman/listinfo/openembedded-core > > > > > -- > "Thou shalt not follow the NULL pointer, for chaos and madness await thee at > its end" -- _______________________________________________ Openembedded-core mailing list [email protected] http://lists.openembedded.org/mailman/listinfo/openembedded-core
