summaryrefslogtreecommitdiff
path: root/sysdeps/unix/sysv
diff options
context:
space:
mode:
authorAndreas Schwab <schwab@redhat.com>2010-01-04 14:49:08 +0100
committerAndreas Schwab <schwab@redhat.com>2010-01-04 14:49:08 +0100
commit16a7541439c5ae36181e7f454b5a81f8c25aecf4 (patch)
treefca6aa176c1479ed6c3b792692473675b5ab4613 /sysdeps/unix/sysv
parent600f9723fc372c37adfa171aae8e1f62cb5d5bba (diff)
parentc10f8866e5b673b6f41dcb14c8ea319f5e545b1a (diff)
Merge remote branch 'origin/master' into fedora/master
Diffstat (limited to 'sysdeps/unix/sysv')
-rw-r--r--sysdeps/unix/sysv/linux/bits/poll.h4
-rw-r--r--sysdeps/unix/sysv/linux/futimens.c5
-rw-r--r--sysdeps/unix/sysv/linux/sparc/bits/poll.h4
3 files changed, 9 insertions, 4 deletions
diff --git a/sysdeps/unix/sysv/linux/bits/poll.h b/sysdeps/unix/sysv/linux/bits/poll.h
index d7996b46c5..9dd75cb3af 100644
--- a/sysdeps/unix/sysv/linux/bits/poll.h
+++ b/sysdeps/unix/sysv/linux/bits/poll.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 1997, 2001, 2006 Free Software Foundation, Inc.
+/* Copyright (C) 1997, 2001, 2006, 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
@@ -27,7 +27,7 @@
#define POLLPRI 0x002 /* There is urgent data to read. */
#define POLLOUT 0x004 /* Writing now will not block. */
-#ifdef __USE_XOPEN
+#if defined __USE_XOPEN || defined __USE_XOPEN2K8
/* These values are defined in XPG4.2. */
# define POLLRDNORM 0x040 /* Normal data may be read. */
# define POLLRDBAND 0x080 /* Priority data may be read. */
diff --git a/sysdeps/unix/sysv/linux/futimens.c b/sysdeps/unix/sysv/linux/futimens.c
index 67f2588f86..fe8e92070d 100644
--- a/sysdeps/unix/sysv/linux/futimens.c
+++ b/sysdeps/unix/sysv/linux/futimens.c
@@ -33,6 +33,11 @@ int
futimens (int fd, const struct timespec tsp[2])
{
#ifdef __NR_utimensat
+ if (fd < 0)
+ {
+ __set_errno (EBADF);
+ return -1;
+ }
return INLINE_SYSCALL (utimensat, 4, fd, NULL, tsp, 0);
#else
__set_errno (ENOSYS);
diff --git a/sysdeps/unix/sysv/linux/sparc/bits/poll.h b/sysdeps/unix/sysv/linux/sparc/bits/poll.h
index 53b94bc50e..0a984ad765 100644
--- a/sysdeps/unix/sysv/linux/sparc/bits/poll.h
+++ b/sysdeps/unix/sysv/linux/sparc/bits/poll.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 1997, 2001, 2006 Free Software Foundation, Inc.
+/* Copyright (C) 1997, 2001, 2006, 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
@@ -27,7 +27,7 @@
#define POLLPRI 0x002 /* There is urgent data to read. */
#define POLLOUT 0x004 /* Writing now will not block. */
-#ifdef __USE_XOPEN
+#if defined __USE_XOPEN || defined __USE_XOPEN2K8
/* These values are defined in XPG4.2. */
# define POLLRDNORM 0x040 /* Normal data may be read. */
# define POLLRDBAND 0x080 /* Priority data may be read. */