aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--NEWS2
-rw-r--r--io/Makefile4
-rw-r--r--io/tst-fcntl-lock-lfs.c2
-rw-r--r--sysdeps/unix/sysv/linux/powerpc/bits/fcntl.h2
4 files changed, 8 insertions, 2 deletions
diff --git a/NEWS b/NEWS
index c1456869ad..8923c70820 100644
--- a/NEWS
+++ b/NEWS
@@ -71,6 +71,8 @@ The following bugs are resolved with this release:
[30477] libc: [RISCV]: time64 does not work on riscv32
[30515] _dl_find_object incorrectly returns 1 during early startup
[30785] Always call destructors in reverse constructor order
+ [30804] F_GETLK, F_SETLK, and F_SETLKW value change for powerpc64 with
+ -D_FILE_OFFSET_BITS=64
[30842] Stack read overflow in getaddrinfo in no-aaaa mode (CVE-2023-4527)
Version 2.36
diff --git a/io/Makefile b/io/Makefile
index fb363c612c..b896484320 100644
--- a/io/Makefile
+++ b/io/Makefile
@@ -59,6 +59,7 @@ routines := \
ftw64-time64 \
closefrom close_range
+
others := pwd
test-srcs := ftwtest ftwtest-time64
tests := test-utime test-stat test-stat2 test-lfs tst-getcwd \
@@ -81,7 +82,8 @@ tests := test-utime test-stat test-stat2 test-lfs tst-getcwd \
tst-closefrom \
tst-close_range \
tst-ftw-bz28126 \
- tst-fcntl-lock
+ tst-fcntl-lock \
+ tst-fcntl-lock-lfs
tests-time64 := \
tst-fcntl-time64 \
diff --git a/io/tst-fcntl-lock-lfs.c b/io/tst-fcntl-lock-lfs.c
new file mode 100644
index 0000000000..f2a909fb02
--- /dev/null
+++ b/io/tst-fcntl-lock-lfs.c
@@ -0,0 +1,2 @@
+#define _FILE_OFFSET_BITS 64
+#include <io/tst-fcntl-lock.c>
diff --git a/sysdeps/unix/sysv/linux/powerpc/bits/fcntl.h b/sysdeps/unix/sysv/linux/powerpc/bits/fcntl.h
index 49c8fac0fb..0ca6e69ee9 100644
--- a/sysdeps/unix/sysv/linux/powerpc/bits/fcntl.h
+++ b/sysdeps/unix/sysv/linux/powerpc/bits/fcntl.h
@@ -33,7 +33,7 @@
# define __O_LARGEFILE 0200000
#endif
-#if __WORDSIZE == 64
+#if __WORDSIZE == 64 && !defined __USE_FILE_OFFSET64
# define F_GETLK 5
# define F_SETLK 6
# define F_SETLKW 7