From cd3411088f6bb4393d79c50b5f7eef3f11a83435 Mon Sep 17 00:00:00 2001 From: Tudor Florea Date: Fri, 10 Oct 2014 00:31:33 +0200 Subject: initial commit for Enea Linux 4.0-140929 Migrated from the internal git server on the daisy-enea-point-release branch Signed-off-by: Tudor Florea --- recipes-append/eglibc/eglibc_2.19.bbappend | 5 +++ .../files/glibc-fedora-linux-tcsetattr.patch | 49 ++++++++++++++++++++++ 2 files changed, 54 insertions(+) create mode 100644 recipes-append/eglibc/eglibc_2.19.bbappend create mode 100644 recipes-append/eglibc/files/glibc-fedora-linux-tcsetattr.patch (limited to 'recipes-append/eglibc') diff --git a/recipes-append/eglibc/eglibc_2.19.bbappend b/recipes-append/eglibc/eglibc_2.19.bbappend new file mode 100644 index 0000000..e95b480 --- /dev/null +++ b/recipes-append/eglibc/eglibc_2.19.bbappend @@ -0,0 +1,5 @@ +FILESEXTRAPATHS_prepend := "${THISDIR}/files:" + +SRC_URI += "\ + file://glibc-fedora-linux-tcsetattr.patch \ + " diff --git a/recipes-append/eglibc/files/glibc-fedora-linux-tcsetattr.patch b/recipes-append/eglibc/files/glibc-fedora-linux-tcsetattr.patch new file mode 100644 index 0000000..ca9030d --- /dev/null +++ b/recipes-append/eglibc/files/glibc-fedora-linux-tcsetattr.patch @@ -0,0 +1,49 @@ +diff -Nrup a/sysdeps/unix/sysv/linux/tcsetattr.c b/sysdeps/unix/sysv/linux/tcsetattr.c +--- a/sysdeps/unix/sysv/linux/tcsetattr.c 2012-06-05 07:42:49.000000000 -0600 ++++ b/sysdeps/unix/sysv/linux/tcsetattr.c 2012-06-07 12:15:21.831318623 -0600 +@@ -48,6 +48,7 @@ tcsetattr (fd, optional_actions, termios + { + struct __kernel_termios k_termios; + unsigned long int cmd; ++ int retval; + + switch (optional_actions) + { +@@ -79,6 +80,35 @@ tcsetattr (fd, optional_actions, termios + memcpy (&k_termios.c_cc[0], &termios_p->c_cc[0], + __KERNEL_NCCS * sizeof (cc_t)); + +- return INLINE_SYSCALL (ioctl, 3, fd, cmd, &k_termios); ++ retval = INLINE_SYSCALL (ioctl, 3, fd, cmd, &k_termios); ++ ++ if (retval == 0 && cmd == TCSETS) ++ { ++ /* The Linux kernel has a bug which silently ignore the invalid ++ c_cflag on pty. We have to check it here. */ ++ int save = errno; ++ retval = INLINE_SYSCALL (ioctl, 3, fd, TCGETS, &k_termios); ++ if (retval) ++ { ++ /* We cannot verify if the setting is ok. We don't return ++ an error (?). */ ++ __set_errno (save); ++ retval = 0; ++ } ++ else if ((termios_p->c_cflag & (PARENB | CREAD)) ++ != (k_termios.c_cflag & (PARENB | CREAD)) ++ || ((termios_p->c_cflag & CSIZE) ++ && ((termios_p->c_cflag & CSIZE) ++ != (k_termios.c_cflag & CSIZE)))) ++ { ++ /* It looks like the Linux kernel silently changed the ++ PARENB/CREAD/CSIZE bits in c_cflag. Report it as an ++ error. */ ++ __set_errno (EINVAL); ++ retval = -1; ++ } ++ } ++ ++ return retval; + } + libc_hidden_def (tcsetattr) + -- cgit v1.2.3-54-g00ecf