[arch-commits] Commit in glibc/trunk (PKGBUILD signalfd-compat.patch)
Jan de Groot
jgc at archlinux.org
Sun Aug 23 14:37:20 UTC 2009
Date: Sunday, August 23, 2009 @ 10:37:19
Author: jgc
Revision: 50135
upgpkg: glibc 2.10.1-4
Add signalfd compatibility patch, this makes udev work on 2.6.24 kernels like the ones provided by Debian and Ubuntu
Added:
glibc/trunk/signalfd-compat.patch
Modified:
glibc/trunk/PKGBUILD
-----------------------+
PKGBUILD | 21 +++++----
signalfd-compat.patch | 106 ++++++++++++++++++++++++++++++++++++++++++++++++
2 files changed, 119 insertions(+), 8 deletions(-)
Modified: PKGBUILD
===================================================================
--- PKGBUILD 2009-08-23 14:33:28 UTC (rev 50134)
+++ PKGBUILD 2009-08-23 14:37:19 UTC (rev 50135)
@@ -6,28 +6,30 @@
pkgname=glibc
pkgver=2.10.1
-pkgrel=3
+pkgrel=4
_glibcdate=20090511
install=glibc.install
backup=(etc/locale.gen
- etc/nscd.conf)
+ etc/nscd.conf)
pkgdesc="GNU C Library"
arch=('i686' 'x86_64')
license=('GPL' 'LGPL')
url="http://www.gnu.org/software/libc"
groups=('base')
-depends=('kernel-headers>=2.6.30.1' 'tzdata')
+depends=('kernel-headers>=2.6.30.5' 'tzdata')
makedepends=('gcc>=4.4')
replaces=('glibc-xen')
source=(ftp://ftp.archlinux.org/other/glibc/${pkgname}-${pkgver}_${_glibcdate}.tar.bz2
- glibc-2.10-dont-build-timezone.patch
- glibc-2.10-bz4781.patch
- nscd
- locale.gen.txt
- locale-gen)
+ glibc-2.10-dont-build-timezone.patch
+ glibc-2.10-bz4781.patch
+ signalfd-compat.patch
+ nscd
+ locale.gen.txt
+ locale-gen)
md5sums=('7a34595abeeedb9aab758aa51d09ed88'
'4dadb9203b69a3210d53514bb46f41c3'
'0c5540efc51c0b93996c51b57a8540ae'
+ '48996ab265324683704b72d5522cae4b'
'b587ee3a70c9b3713099295609afde49'
'07ac979b6ab5eeb778d55f041529d623'
'476e9113489f93b348b21e144b6a8fcf')
@@ -52,6 +54,9 @@
# http://sources.redhat.com/bugzilla/show_bug.cgi?id=4781
patch -Np1 -i ${srcdir}/glibc-2.10-bz4781.patch || return 1
+ #Compatibility with older kernels that have no signalfd4 but do have signalfd
+ patch -Np1 -i "${srcdir}/signalfd-compat.patch" || return 1
+
install -dm755 ${pkgdir}/etc
touch ${pkgdir}/etc/ld.so.conf
Added: signalfd-compat.patch
===================================================================
--- signalfd-compat.patch (rev 0)
+++ signalfd-compat.patch 2009-08-23 14:37:19 UTC (rev 50135)
@@ -0,0 +1,106 @@
+From: Ulrich Drepper <drepper at redhat.com>
+Date: Sun, 26 Jul 2009 19:55:03 +0000 (-0700)
+Subject: Compatibility of signalfd/eventfd with older kernels.
+X-Git-Tag: fedora/glibc-2.10.90-9~1^2~4
+X-Git-Url: http://repo.or.cz/w/glibc.git?a=commitdiff_plain;h=aa7492d2
+
+Compatibility of signalfd/eventfd with older kernels.
+---
+
+diff --git a/sysdeps/unix/sysv/linux/eventfd.c b/sysdeps/unix/sysv/linux/eventfd.c
+index 4cd5579..7f69ecd 100644
+--- a/sysdeps/unix/sysv/linux/eventfd.c
++++ b/sysdeps/unix/sysv/linux/eventfd.c
+@@ -1,4 +1,4 @@
+-/* Copyright (C) 2007, 2008 Free Software Foundation, Inc.
++/* Copyright (C) 2007, 2008, 2009 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
+@@ -19,14 +19,21 @@
+ #include <errno.h>
+ #include <sys/eventfd.h>
+ #include <sysdep.h>
++#include <kernel-features.h>
+
+
+ int
+ eventfd (int count, int flags)
+ {
+ #ifdef __NR_eventfd2
+- return INLINE_SYSCALL (eventfd2, 2, count, flags);
+-#else
++ int res = INLINE_SYSCALL (eventfd2, 2, count, flags);
++# ifndef __ASSUME_EVENTFD2
++ if (res != -1 || errno != ENOSYS)
++# endif
++ return res;
++#endif
++
++#ifndef __ASSUME_EVENTFD2
+ /* The old system call has no flag parameter which is bad. So we have
+ to wait until we have to support to pass additional values to the
+ kernel (sys_indirect) before implementing setting flags like
+@@ -43,5 +50,7 @@ eventfd (int count, int flags)
+ __set_errno (ENOSYS);
+ return -1;
+ # endif
++#elif !defined __NR_eventfd2
++# error "__ASSUME_EVENTFD2 defined but not __NR_eventfd2"
+ #endif
+ }
+diff --git a/sysdeps/unix/sysv/linux/kernel-features.h b/sysdeps/unix/sysv/linux/kernel-features.h
+index 4562515..ff065ef 100644
+--- a/sysdeps/unix/sysv/linux/kernel-features.h
++++ b/sysdeps/unix/sysv/linux/kernel-features.h
+@@ -516,6 +516,8 @@
+ # define __ASSUME_SOCK_CLOEXEC 1
+ # define __ASSUME_IN_NONBLOCK 1
+ # define __ASSUME_PIPE2 1
++# define __ASSUME_EVENTFD2 1
++# define __ASSUME_SIGNALFD4 1
+ #endif
+
+ /* Support for the accept4 syscall was added in 2.6.28. */
+diff --git a/sysdeps/unix/sysv/linux/signalfd.c b/sysdeps/unix/sysv/linux/signalfd.c
+index 9898f29..c2d974a 100644
+--- a/sysdeps/unix/sysv/linux/signalfd.c
++++ b/sysdeps/unix/sysv/linux/signalfd.c
+@@ -1,4 +1,4 @@
+-/* Copyright (C) 2007, 2008 Free Software Foundation, Inc.
++/* Copyright (C) 2007, 2008, 2009 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
+@@ -20,14 +20,21 @@
+ #include <signal.h>
+ #include <sys/signalfd.h>
+ #include <sysdep.h>
++#include <kernel-features.h>
+
+
+ int
+ signalfd (int fd, const sigset_t *mask, int flags)
+ {
+ #ifdef __NR_signalfd4
+- return INLINE_SYSCALL (signalfd4, 4, fd, mask, _NSIG / 8, flags);
+-#else
++ int res = INLINE_SYSCALL (signalfd4, 4, fd, mask, _NSIG / 8, flags);
++# ifndef __ASSUME_SIGNALFD4
++ if (res != -1 || errno != ENOSYS)
++# endif
++ return res;
++#endif
++
++#ifndef __ASSUME_SIGNALFD4
+ /* The old system call has no flag parameter which is bad. So we have
+ to wait until we have to support to pass additional values to the
+ kernel (sys_indirect) before implementing setting flags like
+@@ -44,5 +51,7 @@ signalfd (int fd, const sigset_t *mask, int flags)
+ __set_errno (ENOSYS);
+ return -1;
+ # endif
++#elif !defined __NR_signalfd4
++# error "__ASSUME_SIGNALFD4 defined but not __NR_signalfd4"
+ #endif
+ }
More information about the arch-commits
mailing list