diff --git a/io/Makefile b/io/Makefile
index 1a16990205..6120ee0cd7 100644
--- a/io/Makefile
+++ b/io/Makefile
@@ -88,6 +88,8 @@ tests-time64 := \
   tst-utime-time64 \
   tst-utimensat-time64 \
   tst-utimes-time64 \
+  tst-fcntl-time64 \
+  # tests-time64
 
 # Likewise for statx, but we do not need static linking here.
 tests-internal += tst-statx tst-file_change_detection
diff --git a/io/fcntl.h b/io/fcntl.h
index f3b5e0ef77..8917a73b42 100644
--- a/io/fcntl.h
+++ b/io/fcntl.h
@@ -172,17 +172,30 @@ typedef __pid_t pid_t;
 
    This function is a cancellation point and therefore not marked with
    __THROW.  */
-#ifndef __USE_FILE_OFFSET64
+#ifndef __USE_TIME_BITS64
+# ifndef __USE_FILE_OFFSET64
 extern int fcntl (int __fd, int __cmd, ...);
-#else
-# ifdef __REDIRECT
-extern int __REDIRECT (fcntl, (int __fd, int __cmd, ...), fcntl64);
 # else
-#  define fcntl fcntl64
+#  ifdef __REDIRECT
+extern int __REDIRECT (fcntl, (int __fd, int __cmd, ...), fcntl64);
+#  else
+#   define fcntl fcntl64
+#  endif
 # endif
-#endif
-#ifdef __USE_LARGEFILE64
+# ifdef __USE_LARGEFILE64
 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;
+# else
+extern int __fcntl_time64 (int __fd, int __request, ...) __THROW;
+#  define fcntl64 __fcntl_time64
+#  define fcntl __fcntl_time64
+# endif
 #endif
 
 /* Open FILE and return a new file descriptor for it, or -1 on error.
diff --git a/io/tst-fcntl-time64.c b/io/tst-fcntl-time64.c
new file mode 100644
index 0000000000..ef4a5182cb
--- /dev/null
+++ b/io/tst-fcntl-time64.c
@@ -0,0 +1 @@
+#include "tst-fcntl.c"
diff --git a/sysdeps/unix/sysv/linux/arm/be/libc.abilist b/sysdeps/unix/sysv/linux/arm/be/libc.abilist
index 85d572ba84..1243e62e45 100644
--- a/sysdeps/unix/sysv/linux/arm/be/libc.abilist
+++ b/sysdeps/unix/sysv/linux/arm/be/libc.abilist
@@ -203,6 +203,7 @@ GLIBC_2.34 __cnd_timedwait64 F
 GLIBC_2.34 __ctime64 F
 GLIBC_2.34 __ctime64_r F
 GLIBC_2.34 __difftime64 F
+GLIBC_2.34 __fcntl_time64 F
 GLIBC_2.34 __fstat64_time64 F
 GLIBC_2.34 __fstatat64_time64 F
 GLIBC_2.34 __fts64_children_time64 F
diff --git a/sysdeps/unix/sysv/linux/arm/le/libc.abilist b/sysdeps/unix/sysv/linux/arm/le/libc.abilist
index 79be7bcce3..4750d5db49 100644
--- a/sysdeps/unix/sysv/linux/arm/le/libc.abilist
+++ b/sysdeps/unix/sysv/linux/arm/le/libc.abilist
@@ -200,6 +200,7 @@ GLIBC_2.34 __cnd_timedwait64 F
 GLIBC_2.34 __ctime64 F
 GLIBC_2.34 __ctime64_r F
 GLIBC_2.34 __difftime64 F
+GLIBC_2.34 __fcntl_time64 F
 GLIBC_2.34 __fstat64_time64 F
 GLIBC_2.34 __fstatat64_time64 F
 GLIBC_2.34 __fts64_children_time64 F
diff --git a/sysdeps/unix/sysv/linux/csky/libc.abilist b/sysdeps/unix/sysv/linux/csky/libc.abilist
index 1aad4a1be0..6e3263d2fd 100644
--- a/sysdeps/unix/sysv/linux/csky/libc.abilist
+++ b/sysdeps/unix/sysv/linux/csky/libc.abilist
@@ -2335,6 +2335,7 @@ GLIBC_2.34 __cnd_timedwait64 F
 GLIBC_2.34 __ctime64 F
 GLIBC_2.34 __ctime64_r F
 GLIBC_2.34 __difftime64 F
+GLIBC_2.34 __fcntl_time64 F
 GLIBC_2.34 __fstat64_time64 F
 GLIBC_2.34 __fstatat64_time64 F
 GLIBC_2.34 __fts64_children_time64 F
diff --git a/sysdeps/unix/sysv/linux/fcntl64.c b/sysdeps/unix/sysv/linux/fcntl64.c
index ed19c327b9..e65233de4b 100644
--- a/sysdeps/unix/sysv/linux/fcntl64.c
+++ b/sysdeps/unix/sysv/linux/fcntl64.c
@@ -54,6 +54,9 @@ libc_hidden_def (__libc_fcntl64)
 weak_alias (__libc_fcntl64, __fcntl64)
 libc_hidden_weak (__fcntl64)
 weak_alias (__libc_fcntl64, fcntl64)
+#if __TIMESIZE != 64
+weak_alias (__libc_fcntl64, __fcntl_time64)
+#endif
 
 #ifdef __OFF_T_MATCHES_OFF64_T
 weak_alias (__libc_fcntl64, __libc_fcntl)
diff --git a/sysdeps/unix/sysv/linux/hppa/libc.abilist b/sysdeps/unix/sysv/linux/hppa/libc.abilist
index 59f61b4b48..d21cefe909 100644
--- a/sysdeps/unix/sysv/linux/hppa/libc.abilist
+++ b/sysdeps/unix/sysv/linux/hppa/libc.abilist
@@ -2288,6 +2288,7 @@ GLIBC_2.34 __cnd_timedwait64 F
 GLIBC_2.34 __ctime64 F
 GLIBC_2.34 __ctime64_r F
 GLIBC_2.34 __difftime64 F
+GLIBC_2.34 __fcntl_time64 F
 GLIBC_2.34 __fstat64_time64 F
 GLIBC_2.34 __fstatat64_time64 F
 GLIBC_2.34 __fts64_children_time64 F
diff --git a/sysdeps/unix/sysv/linux/i386/libc.abilist b/sysdeps/unix/sysv/linux/i386/libc.abilist
index 0acf01c432..f10f233bf6 100644
--- a/sysdeps/unix/sysv/linux/i386/libc.abilist
+++ b/sysdeps/unix/sysv/linux/i386/libc.abilist
@@ -2471,6 +2471,7 @@ GLIBC_2.34 __cnd_timedwait64 F
 GLIBC_2.34 __ctime64 F
 GLIBC_2.34 __ctime64_r F
 GLIBC_2.34 __difftime64 F
+GLIBC_2.34 __fcntl_time64 F
 GLIBC_2.34 __fstat64_time64 F
 GLIBC_2.34 __fstatat64_time64 F
 GLIBC_2.34 __fts64_children_time64 F
diff --git a/sysdeps/unix/sysv/linux/m68k/coldfire/libc.abilist b/sysdeps/unix/sysv/linux/m68k/coldfire/libc.abilist
index a030d33f83..577f5f171d 100644
--- a/sysdeps/unix/sysv/linux/m68k/coldfire/libc.abilist
+++ b/sysdeps/unix/sysv/linux/m68k/coldfire/libc.abilist
@@ -204,6 +204,7 @@ GLIBC_2.34 __cnd_timedwait64 F
 GLIBC_2.34 __ctime64 F
 GLIBC_2.34 __ctime64_r F
 GLIBC_2.34 __difftime64 F
+GLIBC_2.34 __fcntl_time64 F
 GLIBC_2.34 __fstat64_time64 F
 GLIBC_2.34 __fstatat64_time64 F
 GLIBC_2.34 __fts64_children_time64 F
diff --git a/sysdeps/unix/sysv/linux/m68k/m680x0/libc.abilist b/sysdeps/unix/sysv/linux/m68k/m680x0/libc.abilist
index 9ba724cff0..af68a21c02 100644
--- a/sysdeps/unix/sysv/linux/m68k/m680x0/libc.abilist
+++ b/sysdeps/unix/sysv/linux/m68k/m680x0/libc.abilist
@@ -2415,6 +2415,7 @@ GLIBC_2.34 __cnd_timedwait64 F
 GLIBC_2.34 __ctime64 F
 GLIBC_2.34 __ctime64_r F
 GLIBC_2.34 __difftime64 F
+GLIBC_2.34 __fcntl_time64 F
 GLIBC_2.34 __fstat64_time64 F
 GLIBC_2.34 __fstatat64_time64 F
 GLIBC_2.34 __fts64_children_time64 F
diff --git a/sysdeps/unix/sysv/linux/microblaze/be/libc.abilist b/sysdeps/unix/sysv/linux/microblaze/be/libc.abilist
index 31a33e2d05..c875c87f93 100644
--- a/sysdeps/unix/sysv/linux/microblaze/be/libc.abilist
+++ b/sysdeps/unix/sysv/linux/microblaze/be/libc.abilist
@@ -2386,6 +2386,7 @@ GLIBC_2.34 __cnd_timedwait64 F
 GLIBC_2.34 __ctime64 F
 GLIBC_2.34 __ctime64_r F
 GLIBC_2.34 __difftime64 F
+GLIBC_2.34 __fcntl_time64 F
 GLIBC_2.34 __fstat64_time64 F
 GLIBC_2.34 __fstatat64_time64 F
 GLIBC_2.34 __fts64_children_time64 F
diff --git a/sysdeps/unix/sysv/linux/microblaze/le/libc.abilist b/sysdeps/unix/sysv/linux/microblaze/le/libc.abilist
index 4faaa64714..23835351e3 100644
--- a/sysdeps/unix/sysv/linux/microblaze/le/libc.abilist
+++ b/sysdeps/unix/sysv/linux/microblaze/le/libc.abilist
@@ -2383,6 +2383,7 @@ GLIBC_2.34 __cnd_timedwait64 F
 GLIBC_2.34 __ctime64 F
 GLIBC_2.34 __ctime64_r F
 GLIBC_2.34 __difftime64 F
+GLIBC_2.34 __fcntl_time64 F
 GLIBC_2.34 __fstat64_time64 F
 GLIBC_2.34 __fstatat64_time64 F
 GLIBC_2.34 __fts64_children_time64 F
diff --git a/sysdeps/unix/sysv/linux/mips/mips32/fpu/libc.abilist b/sysdeps/unix/sysv/linux/mips/mips32/fpu/libc.abilist
index b283bb5a3d..08a16d9140 100644
--- a/sysdeps/unix/sysv/linux/mips/mips32/fpu/libc.abilist
+++ b/sysdeps/unix/sysv/linux/mips/mips32/fpu/libc.abilist
@@ -2380,6 +2380,7 @@ GLIBC_2.34 __cnd_timedwait64 F
 GLIBC_2.34 __ctime64 F
 GLIBC_2.34 __ctime64_r F
 GLIBC_2.34 __difftime64 F
+GLIBC_2.34 __fcntl_time64 F
 GLIBC_2.34 __fstat64_time64 F
 GLIBC_2.34 __fstatat64_time64 F
 GLIBC_2.34 __fts64_children_time64 F
diff --git a/sysdeps/unix/sysv/linux/mips/mips32/nofpu/libc.abilist b/sysdeps/unix/sysv/linux/mips/mips32/nofpu/libc.abilist
index 6145a5c1a3..88a739586c 100644
--- a/sysdeps/unix/sysv/linux/mips/mips32/nofpu/libc.abilist
+++ b/sysdeps/unix/sysv/linux/mips/mips32/nofpu/libc.abilist
@@ -2378,6 +2378,7 @@ GLIBC_2.34 __cnd_timedwait64 F
 GLIBC_2.34 __ctime64 F
 GLIBC_2.34 __ctime64_r F
 GLIBC_2.34 __difftime64 F
+GLIBC_2.34 __fcntl_time64 F
 GLIBC_2.34 __fstat64_time64 F
 GLIBC_2.34 __fstatat64_time64 F
 GLIBC_2.34 __fts64_children_time64 F
diff --git a/sysdeps/unix/sysv/linux/mips/mips64/n32/libc.abilist b/sysdeps/unix/sysv/linux/mips/mips64/n32/libc.abilist
index ebbfdc0fe4..a7f8058932 100644
--- a/sysdeps/unix/sysv/linux/mips/mips64/n32/libc.abilist
+++ b/sysdeps/unix/sysv/linux/mips/mips64/n32/libc.abilist
@@ -2386,6 +2386,7 @@ GLIBC_2.34 __cnd_timedwait64 F
 GLIBC_2.34 __ctime64 F
 GLIBC_2.34 __ctime64_r F
 GLIBC_2.34 __difftime64 F
+GLIBC_2.34 __fcntl_time64 F
 GLIBC_2.34 __fstat64_time64 F
 GLIBC_2.34 __fstatat64_time64 F
 GLIBC_2.34 __fts64_children_time64 F
diff --git a/sysdeps/unix/sysv/linux/nios2/libc.abilist b/sysdeps/unix/sysv/linux/nios2/libc.abilist
index e7cb508d19..00242d3e83 100644
--- a/sysdeps/unix/sysv/linux/nios2/libc.abilist
+++ b/sysdeps/unix/sysv/linux/nios2/libc.abilist
@@ -2425,6 +2425,7 @@ GLIBC_2.34 __cnd_timedwait64 F
 GLIBC_2.34 __ctime64 F
 GLIBC_2.34 __ctime64_r F
 GLIBC_2.34 __difftime64 F
+GLIBC_2.34 __fcntl_time64 F
 GLIBC_2.34 __fstat64_time64 F
 GLIBC_2.34 __fstatat64_time64 F
 GLIBC_2.34 __fts64_children_time64 F
diff --git a/sysdeps/unix/sysv/linux/powerpc/powerpc32/fpu/libc.abilist b/sysdeps/unix/sysv/linux/powerpc/powerpc32/fpu/libc.abilist
index 7742c0f9f7..2589b685d6 100644
--- a/sysdeps/unix/sysv/linux/powerpc/powerpc32/fpu/libc.abilist
+++ b/sysdeps/unix/sysv/linux/powerpc/powerpc32/fpu/libc.abilist
@@ -2442,6 +2442,7 @@ GLIBC_2.34 __cnd_timedwait64 F
 GLIBC_2.34 __ctime64 F
 GLIBC_2.34 __ctime64_r F
 GLIBC_2.34 __difftime64 F
+GLIBC_2.34 __fcntl_time64 F
 GLIBC_2.34 __fstat64_time64 F
 GLIBC_2.34 __fstatat64_time64 F
 GLIBC_2.34 __fts64_children_time64 F
diff --git a/sysdeps/unix/sysv/linux/powerpc/powerpc32/nofpu/libc.abilist b/sysdeps/unix/sysv/linux/powerpc/powerpc32/nofpu/libc.abilist
index d0786c84a9..e4b172a6e0 100644
--- a/sysdeps/unix/sysv/linux/powerpc/powerpc32/nofpu/libc.abilist
+++ b/sysdeps/unix/sysv/linux/powerpc/powerpc32/nofpu/libc.abilist
@@ -2475,6 +2475,7 @@ GLIBC_2.34 __cnd_timedwait64 F
 GLIBC_2.34 __ctime64 F
 GLIBC_2.34 __ctime64_r F
 GLIBC_2.34 __difftime64 F
+GLIBC_2.34 __fcntl_time64 F
 GLIBC_2.34 __fstat64_time64 F
 GLIBC_2.34 __fstatat64_time64 F
 GLIBC_2.34 __fts64_children_time64 F
diff --git a/sysdeps/unix/sysv/linux/s390/s390-32/libc.abilist b/sysdeps/unix/sysv/linux/s390/s390-32/libc.abilist
index fd09d6a21b..be2908b27a 100644
--- a/sysdeps/unix/sysv/linux/s390/s390-32/libc.abilist
+++ b/sysdeps/unix/sysv/linux/s390/s390-32/libc.abilist
@@ -2440,6 +2440,7 @@ GLIBC_2.34 __cnd_timedwait64 F
 GLIBC_2.34 __ctime64 F
 GLIBC_2.34 __ctime64_r F
 GLIBC_2.34 __difftime64 F
+GLIBC_2.34 __fcntl_time64 F
 GLIBC_2.34 __fstat64_time64 F
 GLIBC_2.34 __fstatat64_time64 F
 GLIBC_2.34 __fts64_children_time64 F
diff --git a/sysdeps/unix/sysv/linux/sh/be/libc.abilist b/sysdeps/unix/sysv/linux/sh/be/libc.abilist
index 48f13e2b53..4797150a1c 100644
--- a/sysdeps/unix/sysv/linux/sh/be/libc.abilist
+++ b/sysdeps/unix/sysv/linux/sh/be/libc.abilist
@@ -2295,6 +2295,7 @@ GLIBC_2.34 __cnd_timedwait64 F
 GLIBC_2.34 __ctime64 F
 GLIBC_2.34 __ctime64_r F
 GLIBC_2.34 __difftime64 F
+GLIBC_2.34 __fcntl_time64 F
 GLIBC_2.34 __fstat64_time64 F
 GLIBC_2.34 __fstatat64_time64 F
 GLIBC_2.34 __fts64_children_time64 F
diff --git a/sysdeps/unix/sysv/linux/sh/le/libc.abilist b/sysdeps/unix/sysv/linux/sh/le/libc.abilist
index e1ff04148b..4d38657618 100644
--- a/sysdeps/unix/sysv/linux/sh/le/libc.abilist
+++ b/sysdeps/unix/sysv/linux/sh/le/libc.abilist
@@ -2292,6 +2292,7 @@ GLIBC_2.34 __cnd_timedwait64 F
 GLIBC_2.34 __ctime64 F
 GLIBC_2.34 __ctime64_r F
 GLIBC_2.34 __difftime64 F
+GLIBC_2.34 __fcntl_time64 F
 GLIBC_2.34 __fstat64_time64 F
 GLIBC_2.34 __fstatat64_time64 F
 GLIBC_2.34 __fts64_children_time64 F
diff --git a/sysdeps/unix/sysv/linux/sparc/sparc32/libc.abilist b/sysdeps/unix/sysv/linux/sparc/sparc32/libc.abilist
index 2100ecc3f9..fe026eb19e 100644
--- a/sysdeps/unix/sysv/linux/sparc/sparc32/libc.abilist
+++ b/sysdeps/unix/sysv/linux/sparc/sparc32/libc.abilist
@@ -2435,6 +2435,7 @@ GLIBC_2.34 __cnd_timedwait64 F
 GLIBC_2.34 __ctime64 F
 GLIBC_2.34 __ctime64_r F
 GLIBC_2.34 __difftime64 F
+GLIBC_2.34 __fcntl_time64 F
 GLIBC_2.34 __fstat64_time64 F
 GLIBC_2.34 __fstatat64_time64 F
 GLIBC_2.34 __fts64_children_time64 F
