uClibc eventfd system calls does not work properly if flags specified on mips chip for example atheros. Patch is already submitted to the upstream project: http://lists.uclibc.org/pipermail/uclibc/2013-April/047734.html
Signed-off-by: Hiroaki KAWAI <[email protected]> --- .../501-eventfd-arch-specific-flag.patch | 208 +++++++++++++++++++++ 1 file changed, 208 insertions(+) create mode 100644 toolchain/uClibc/patches-0.9.33.2/501-eventfd-arch-specific-flag.patch diff --git a/toolchain/uClibc/patches-0.9.33.2/501-eventfd-arch-specific-flag.patch b/toolchain/uClibc/patches-0.9.33.2/501-eventfd-arch-specific-flag.patch new file mode 100644 index 0000000..4f10337 --- /dev/null +++ b/toolchain/uClibc/patches-0.9.33.2/501-eventfd-arch-specific-flag.patch @@ -0,0 +1,208 @@ +From f430eb323d614aeba0a34f3c27954edbaff9d9c3 Mon Sep 17 00:00:00 2001 +From: Hiroaki KAWAI <[email protected]> +Date: Thu, 18 Apr 2013 10:44:33 +0900 +Subject: [PATCH] eventfd.h: Use new "bits/" scheme for arch-specific flags + +As in timerfd.h, eventfd.h needs arch-specific definition files. +alpha, mips and sparc needs separate file, all the other arch +will use common definition. + +This problem is already fixed in glibc. + +Signed-off-by: Hiroaki KAWAI <[email protected]> +--- + libc/sysdeps/linux/alpha/bits/eventfd.h | 32 ++++++++++++++++++++++++++++++ + libc/sysdeps/linux/common/bits/eventfd.h | 32 ++++++++++++++++++++++++++++++ + libc/sysdeps/linux/common/sys/eventfd.h | 14 +----------- + libc/sysdeps/linux/mips/bits/eventfd.h | 32 ++++++++++++++++++++++++++++++ + libc/sysdeps/linux/sparc/bits/eventfd.h | 32 ++++++++++++++++++++++++++++++ + 5 files changed, 130 insertions(+), 12 deletions(-) + create mode 100644 libc/sysdeps/linux/alpha/bits/eventfd.h + create mode 100644 libc/sysdeps/linux/common/bits/eventfd.h + create mode 100644 libc/sysdeps/linux/mips/bits/eventfd.h + create mode 100644 libc/sysdeps/linux/sparc/bits/eventfd.h + +diff --git a/libc/sysdeps/linux/alpha/bits/eventfd.h b/libc/sysdeps/linux/alpha/bits/eventfd.h +new file mode 100644 +index 0000000..999f925 +--- /dev/null ++++ b/libc/sysdeps/linux/alpha/bits/eventfd.h +@@ -0,0 +1,32 @@ ++/* Copyright (C) 2008-2012 Free Software Foundation, Inc. ++ This file is part of the GNU C Library. ++ ++ The GNU C Library is free software; you can redistribute it and/or ++ modify it under the terms of the GNU Lesser General Public ++ License as published by the Free Software Foundation; either ++ version 2.1 of the License, or (at your option) any later version. ++ ++ The GNU C Library is distributed in the hope that it will be useful, ++ but WITHOUT ANY WARRANTY; without even the implied warranty of ++ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ++ Lesser General Public License for more details. ++ ++ You should have received a copy of the GNU Lesser General Public ++ License along with the GNU C Library; if not, see ++ <http://www.gnu.org/licenses/>. */ ++ ++#ifndef _SYS_EVENTFD_H ++# error "Never use <bits/eventfd.h> directly; include <sys/eventfd.h> instead." ++#endif ++ ++/* Flags for `eventfd'. */ ++enum ++ { ++ EFD_SEMAPHORE = 1, ++#define EFD_SEMAPHORE EFD_SEMAPHORE ++ EFD_CLOEXEC = 010000000, ++#define EFD_CLOEXEC EFD_CLOEXEC ++ EFD_NONBLOCK = 000000004 ++#define EFD_NONBLOCK EFD_NONBLOCK ++ }; ++ +diff --git a/libc/sysdeps/linux/common/bits/eventfd.h b/libc/sysdeps/linux/common/bits/eventfd.h +new file mode 100644 +index 0000000..5f034bb +--- /dev/null ++++ b/libc/sysdeps/linux/common/bits/eventfd.h +@@ -0,0 +1,32 @@ ++/* Copyright (C) 2008-2012 Free Software Foundation, Inc. ++ This file is part of the GNU C Library. ++ ++ The GNU C Library is free software; you can redistribute it and/or ++ modify it under the terms of the GNU Lesser General Public ++ License as published by the Free Software Foundation; either ++ version 2.1 of the License, or (at your option) any later version. ++ ++ The GNU C Library is distributed in the hope that it will be useful, ++ but WITHOUT ANY WARRANTY; without even the implied warranty of ++ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ++ Lesser General Public License for more details. ++ ++ You should have received a copy of the GNU Lesser General Public ++ License along with the GNU C Library; if not, see ++ <http://www.gnu.org/licenses/>. */ ++ ++#ifndef _SYS_EVENTFD_H ++# error "Never use <bits/eventfd.h> directly; include <sys/eventfd.h> instead." ++#endif ++ ++/* Flags for `eventfd'. */ ++enum ++ { ++ EFD_SEMAPHORE = 1, ++#define EFD_SEMAPHORE EFD_SEMAPHORE ++ EFD_CLOEXEC = 02000000, ++#define EFD_CLOEXEC EFD_CLOEXEC ++ EFD_NONBLOCK = 04000 ++#define EFD_NONBLOCK EFD_NONBLOCK ++ }; ++ +diff --git a/libc/sysdeps/linux/common/sys/eventfd.h b/libc/sysdeps/linux/common/sys/eventfd.h +index 311f803..a57dbc9 100644 +--- a/libc/sysdeps/linux/common/sys/eventfd.h ++++ b/libc/sysdeps/linux/common/sys/eventfd.h +@@ -21,22 +21,12 @@ + + #include <stdint.h> + ++/* Get the platform-dependent flags. */ ++#include <bits/eventfd.h> + + /* Type for event counter. */ + typedef uint64_t eventfd_t; + +-/* Flags for signalfd. */ +-enum +- { +- EFD_SEMAPHORE = 1, +-#define EFD_SEMAPHORE EFD_SEMAPHORE +- EFD_CLOEXEC = 02000000, +-#define EFD_CLOEXEC EFD_CLOEXEC +- EFD_NONBLOCK = 04000 +-#define EFD_NONBLOCK EFD_NONBLOCK +- }; +- +- + __BEGIN_DECLS + + /* Return file descriptor for generic event channel. Set initial +diff --git a/libc/sysdeps/linux/mips/bits/eventfd.h b/libc/sysdeps/linux/mips/bits/eventfd.h +new file mode 100644 +index 0000000..eaf08e8 +--- /dev/null ++++ b/libc/sysdeps/linux/mips/bits/eventfd.h +@@ -0,0 +1,32 @@ ++/* Copyright (C) 2008-2012 Free Software Foundation, Inc. ++ This file is part of the GNU C Library. ++ ++ The GNU C Library is free software; you can redistribute it and/or ++ modify it under the terms of the GNU Lesser General Public ++ License as published by the Free Software Foundation; either ++ version 2.1 of the License, or (at your option) any later version. ++ ++ The GNU C Library is distributed in the hope that it will be useful, ++ but WITHOUT ANY WARRANTY; without even the implied warranty of ++ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ++ Lesser General Public License for more details. ++ ++ You should have received a copy of the GNU Lesser General Public ++ License along with the GNU C Library; if not, see ++ <http://www.gnu.org/licenses/>. */ ++ ++#ifndef _SYS_EVENTFD_H ++# error "Never use <bits/eventfd.h> directly; include <sys/eventfd.h> instead." ++#endif ++ ++/* Flags for `eventfd'. */ ++enum ++ { ++ EFD_SEMAPHORE = 1, ++#define EFD_SEMAPHORE EFD_SEMAPHORE ++ EFD_CLOEXEC = 02000000, ++#define EFD_CLOEXEC EFD_CLOEXEC ++ EFD_NONBLOCK = 00000200 ++#define EFD_NONBLOCK EFD_NONBLOCK ++ }; ++ +diff --git a/libc/sysdeps/linux/sparc/bits/eventfd.h b/libc/sysdeps/linux/sparc/bits/eventfd.h +new file mode 100644 +index 0000000..9434b76 +--- /dev/null ++++ b/libc/sysdeps/linux/sparc/bits/eventfd.h +@@ -0,0 +1,32 @@ ++/* Copyright (C) 2008-2012 Free Software Foundation, Inc. ++ This file is part of the GNU C Library. ++ ++ The GNU C Library is free software; you can redistribute it and/or ++ modify it under the terms of the GNU Lesser General Public ++ License as published by the Free Software Foundation; either ++ version 2.1 of the License, or (at your option) any later version. ++ ++ The GNU C Library is distributed in the hope that it will be useful, ++ but WITHOUT ANY WARRANTY; without even the implied warranty of ++ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ++ Lesser General Public License for more details. ++ ++ You should have received a copy of the GNU Lesser General Public ++ License along with the GNU C Library; if not, see ++ <http://www.gnu.org/licenses/>. */ ++ ++#ifndef _SYS_EVENTFD_H ++# error "Never use <bits/eventfd.h> directly; include <sys/eventfd.h> instead." ++#endif ++ ++/* Flags for `eventfd'. */ ++enum ++ { ++ EFD_SEMAPHORE = 1, ++#define EFD_SEMAPHORE EFD_SEMAPHORE ++ EFD_CLOEXEC = 0x400000, ++#define EFD_CLOEXEC EFD_CLOEXEC ++ EFD_NONBLOCK = 0x004000 ++#define EFD_NONBLOCK EFD_NONBLOCK ++ }; ++ +-- +1.7.9 + -- 1.8.1.4 _______________________________________________ openwrt-devel mailing list [email protected] https://lists.openwrt.org/mailman/listinfo/openwrt-devel
