[PATCH] unistd.h: enable SEEK_DATA and SEEK_HOLE also for POSIX-1.2024
Christian Franke <[email protected]>
| Newsgroups | gmane.comp.lib.newlib |
|---|---|
| Message-ID | <[email protected]> |
SEEK_DATA and SEEK_HOLE are no longer GNU extensions only. -- Regards, Christian
0001-unistd.h-enable-SEEK_DATA-and-SEEK_HOLE-also-for-POS.patch
(text/plain, 918 B)
From 0d68f316bf66188b0109b6e3325da8672c6da386 Mon Sep 17 00:00:00 2001 From: Christian Franke <[email protected]> Date: Fri, 14 Feb 2025 14:39:23 +0100 Subject: [PATCH] unistd.h: enable SEEK_DATA and SEEK_HOLE also for POSIX-1.2024 https://pubs.opengroup.org/onlinepubs/9799919799/functions/lseek.html Signed-off-by: Christian Franke <[email protected]> --- newlib/libc/include/sys/unistd.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/newlib/libc/include/sys/unistd.h b/newlib/libc/include/sys/unistd.h index 9dae4b373..e62e38d10 100644 --- a/newlib/libc/include/sys/unistd.h +++ b/newlib/libc/include/sys/unistd.h @@ -333,7 +333,7 @@ int unlinkat (int, const char *, int); # define SEEK_SET 0 # define SEEK_CUR 1 # define SEEK_END 2 -#if __GNU_VISIBLE +#if __GNU_VISIBLE || __POSIX_VISIBLE >= 202405 # define SEEK_DATA 3 # define SEEK_HOLE 4 #endif -- 2.45.1