This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
[PATCH] Fix prototype for eventfd
- From: Rasmus Villemoes <rv at rasmusvillemoes dot dk>
- To: libc-alpha at sourceware dot org
- Date: Wed, 30 Apr 2014 12:30:32 +0200
- Subject: [PATCH] Fix prototype for eventfd
- Authentication-results: sourceware.org; auth=none
Both the man-page and the actual kernel source says that the first
argument to eventfd is unsigned int, not simply int.
Signed-off-by: Rasmus Villemoes <rv@rasmusvillemoes.dk>
---
ports/sysdeps/unix/sysv/linux/hppa/sys/eventfd.h | 2 +-
sysdeps/unix/sysv/linux/eventfd.c | 2 +-
sysdeps/unix/sysv/linux/sys/eventfd.h | 2 +-
3 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/ports/sysdeps/unix/sysv/linux/hppa/sys/eventfd.h b/ports/sysdeps/unix/sysv/linux/hppa/sys/eventfd.h
index 2d198a8..a3c340e 100644
--- a/ports/sysdeps/unix/sysv/linux/hppa/sys/eventfd.h
+++ b/ports/sysdeps/unix/sysv/linux/hppa/sys/eventfd.h
@@ -40,7 +40,7 @@ __BEGIN_DECLS
/* Return file descriptor for generic event channel. Set initial
value to COUNT. */
-extern int eventfd (int __count, int __flags) __THROW;
+extern int eventfd (unsigned int __count, int __flags) __THROW;
/* Read event counter and possibly wait for events. */
extern int eventfd_read (int __fd, eventfd_t *__value);
diff --git a/sysdeps/unix/sysv/linux/eventfd.c b/sysdeps/unix/sysv/linux/eventfd.c
index 425c811..83da67f 100644
--- a/sysdeps/unix/sysv/linux/eventfd.c
+++ b/sysdeps/unix/sysv/linux/eventfd.c
@@ -22,7 +22,7 @@
int
-eventfd (int count, int flags)
+eventfd (unsigned int count, int flags)
{
#ifdef __NR_eventfd2
int res = INLINE_SYSCALL (eventfd2, 2, count, flags);
diff --git a/sysdeps/unix/sysv/linux/sys/eventfd.h b/sysdeps/unix/sysv/linux/sys/eventfd.h
index 7f977ed..0806891 100644
--- a/sysdeps/unix/sysv/linux/sys/eventfd.h
+++ b/sysdeps/unix/sysv/linux/sys/eventfd.h
@@ -31,7 +31,7 @@ __BEGIN_DECLS
/* Return file descriptor for generic event channel. Set initial
value to COUNT. */
-extern int eventfd (int __count, int __flags) __THROW;
+extern int eventfd (unsigned int __count, int __flags) __THROW;
/* Read event counter and possibly wait for events. */
extern int eventfd_read (int __fd, eventfd_t *__value);
--
2.0.0.rc1.4.gd8779e1