dl-openat64: always use openat

Message ID 1451428309-24160-1-git-send-email-aurelien@aurel32.net
State New, archived
Headers

Commit Message

Aurelien Jarno Dec. 29, 2015, 10:31 p.m. UTC
  Since we require at least a 2.6.32 Linux kernel, the openat syscall is
always available. Remove the corresponding compatibility code.

	* sysdeps/unix/sysv/linux/dl-openat64.c [!__NR_openat] (openat64):
	Remove.
---
 ChangeLog                             | 5 +++++
 sysdeps/unix/sysv/linux/dl-openat64.c | 4 ----
 2 files changed, 5 insertions(+), 4 deletions(-)
  

Comments

Mike Frysinger Dec. 29, 2015, 10:36 p.m. UTC | #1
On 29 Dec 2015 23:31, Aurelien Jarno wrote:
> Since we require at least a 2.6.32 Linux kernel, the openat syscall is
> always available. Remove the corresponding compatibility code.

lgtm.  openat.c already requires it too.
-mike
  

Patch

diff --git a/ChangeLog b/ChangeLog
index f3f26d7..0fb5434 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@ 
+2015-12-29  Aurelien Jarno  <aurelien@aurel32.et>
+
+	* sysdeps/unix/sysv/linux/dl-openat64.c [!__NR_openat] (openat64):
+	Remove compatibility code.
+
 2015-12-23  Torvald Riegel  <triegel@redhat.com>
 
 	[BZ #13690]
diff --git a/sysdeps/unix/sysv/linux/dl-openat64.c b/sysdeps/unix/sysv/linux/dl-openat64.c
index 7eea0ca..95cd7c0 100644
--- a/sysdeps/unix/sysv/linux/dl-openat64.c
+++ b/sysdeps/unix/sysv/linux/dl-openat64.c
@@ -27,9 +27,5 @@  openat64 (int dfd, const char *file, int oflag, ...)
 {
   assert (!__OPEN_NEEDS_MODE (oflag));
 
-#ifdef __NR_openat
   return INLINE_SYSCALL (openat, 3, dfd, file, oflag | O_LARGEFILE);
-#else
-  return INLINE_SYSCALL_ERROR_RETURN_VALUE (ENOSYS);
-#endif
 }