]> git.ipfire.org Git - thirdparty/glibc.git/commitdiff
Linux: Fix fcntl, ioctl, prctl redirects for _TIME_BITS=64 (bug 28182)
authorFlorian Weimer <fweimer@redhat.com>
Fri, 6 Aug 2021 07:51:38 +0000 (09:51 +0200)
committerFlorian Weimer <fweimer@redhat.com>
Fri, 6 Aug 2021 07:52:00 +0000 (09:52 +0200)
__REDIRECT and __THROW are not compatible with C++ due to the ordering of the
__asm__ alias and the throw specifier. __REDIRECT_NTH has to be used
instead.

Fixes commit 8a40aff86ba5f64a3a84883e539cb67b ("io: Add time64 alias
for fcntl"), commit 82c395d91ea4f69120d453aeec398e30 ("misc: Add
time64 alias for ioctl"), commit b39ffab860cd743a82c91946619f1b8158
("Linux: Add time64 alias for prctl").

Reviewed-by: Carlos O'Donell <carlos@redhat.com>
io/fcntl.h
misc/sys/ioctl.h
sysdeps/unix/sysv/linux/sys/prctl.h

index 8917a73b420b503dec9f665d2769613ec8b6b420..1c96f98f4d75ce6542bec6b45a997c39118d003d 100644 (file)
@@ -187,10 +187,10 @@ extern int fcntl64 (int __fd, int __cmd, ...);
 # endif
 #else /* __USE_TIME_BITS64 */
 # ifdef __REDIRECT
-extern int __REDIRECT (fcntl, (int __fd, int __request, ...),
-                      __fcntl_time64)  __THROW;
-extern int __REDIRECT (fcntl64, (int __fd, int __request, ...),
-                      __fcntl_time64)  __THROW;
+extern int __REDIRECT_NTH (fcntl, (int __fd, int __request, ...),
+                          __fcntl_time64);
+extern int __REDIRECT_NTH (fcntl64, (int __fd, int __request, ...),
+                          __fcntl_time64);
 # else
 extern int __fcntl_time64 (int __fd, int __request, ...) __THROW;
 #  define fcntl64 __fcntl_time64
index 6884d9925f06125fefef4797d9650a06f7ebbc61..9945c1e9181eb3135696cfc889fe9c9458da5b1d 100644 (file)
@@ -42,8 +42,8 @@ __BEGIN_DECLS
 extern int ioctl (int __fd, unsigned long int __request, ...) __THROW;
 #else
 # ifdef __REDIRECT
-extern int __REDIRECT (ioctl, (int __fd, unsigned long int __request, ...),
-                      __ioctl_time64) __THROW;
+extern int __REDIRECT_NTH (ioctl, (int __fd, unsigned long int __request, ...),
+                          __ioctl_time64);
 # else
 extern int __ioctl_time64 (int __fd, unsigned long int __request, ...) __THROW;
 #  define ioctl __ioctl_time64
index db88938b3a542b0b915dbebac315db6fbc294354..f0e0d2f27f9b9ee9222fb6d9087aca514b793ba6 100644 (file)
@@ -42,7 +42,7 @@ __BEGIN_DECLS
 extern int prctl (int __option, ...) __THROW;
 #else
 # ifdef __REDIRECT
-extern int __REDIRECT (prctl, (int __option, ...), __prctl_time64) __THROW;
+extern int __REDIRECT_NTH (prctl, (int __option, ...), __prctl_time64);
 # else
 extern int __prctl_time64 (int __option,d ...) __THROW;
 #  define ioctl __prctl_time64