about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--include/sys/sem.h10
-rw-r--r--sysdeps/unix/sysv/linux/semop.c6
-rw-r--r--sysdeps/unix/sysv/linux/semtimedop.c5
-rw-r--r--sysvipc/semtimedop.c6
4 files changed, 17 insertions, 10 deletions
diff --git a/include/sys/sem.h b/include/sys/sem.h
index b0fb201bd0..69fdf1f752 100644
--- a/include/sys/sem.h
+++ b/include/sys/sem.h
@@ -1 +1,9 @@
-#include <sysvipc/sys/sem.h>
+#ifndef _SYS_SEM_H
+# include <sysvipc/sys/sem.h>
+
+# ifndef _ISOMAC
+
+__typeof__ (semtimedop) __semtimedop attribute_hidden;
+
+# endif
+#endif
diff --git a/sysdeps/unix/sysv/linux/semop.c b/sysdeps/unix/sysv/linux/semop.c
index 687fdcb805..e111b9aa3d 100644
--- a/sysdeps/unix/sysv/linux/semop.c
+++ b/sysdeps/unix/sysv/linux/semop.c
@@ -26,9 +26,5 @@
 int
 semop (int semid, struct sembuf *sops, size_t nsops)
 {
-#ifdef __ASSUME_DIRECT_SYSVIPC_SYSCALLS
-  return INLINE_SYSCALL_CALL (semop, semid, sops, nsops);
-#else
-  return INLINE_SYSCALL_CALL (ipc, IPCOP_semop, semid, nsops, 0, sops);
-#endif
+  return __semtimedop (semid, sops, nsops, NULL);
 }
diff --git a/sysdeps/unix/sysv/linux/semtimedop.c b/sysdeps/unix/sysv/linux/semtimedop.c
index f34a7fb920..09c18d9781 100644
--- a/sysdeps/unix/sysv/linux/semtimedop.c
+++ b/sysdeps/unix/sysv/linux/semtimedop.c
@@ -24,8 +24,8 @@
 /* Perform user-defined atomical operation of array of semaphores.  */
 
 int
-semtimedop (int semid, struct sembuf *sops, size_t nsops,
-	    const struct timespec *timeout)
+__semtimedop (int semid, struct sembuf *sops, size_t nsops,
+	      const struct timespec *timeout)
 {
 #ifdef __ASSUME_DIRECT_SYSVIPC_SYSCALLS
   return INLINE_SYSCALL_CALL (semtimedop, semid, sops, nsops, timeout);
@@ -34,3 +34,4 @@ semtimedop (int semid, struct sembuf *sops, size_t nsops,
 			      SEMTIMEDOP_IPC_ARGS (nsops, sops, timeout));
 #endif
 }
+weak_alias (__semtimedop, semtimedop)
diff --git a/sysvipc/semtimedop.c b/sysvipc/semtimedop.c
index 5ca4d47ee3..68707d6ade 100644
--- a/sysvipc/semtimedop.c
+++ b/sysvipc/semtimedop.c
@@ -22,11 +22,13 @@
 /* Perform user-defined atomical operation of array of semaphores.  */
 
 int
-semtimedop (int semid, struct sembuf *sops, size_t nsops,
-	    const struct timespec *timeout)
+__semtimedop (int semid, struct sembuf *sops, size_t nsops,
+	      const struct timespec *timeout)
 {
   __set_errno (ENOSYS);
   return -1;
 }
+weak_alias (__semtimedop, semtimedop)
+libc_hidden_def (__semtimedop)
 
 stub_warning (semtimedop)