unistd.h: enable SEEK_DATA and SEEK_HOLE also for POSIX-1.2024
Commit Message
SEEK_DATA and SEEK_HOLE are no longer GNU extensions only.
Comments
This looks good to me.
--joel
On Fri, Feb 14, 2025 at 7:58 AM Christian Franke <
Christian.Franke@t-online.de> wrote:
> SEEK_DATA and SEEK_HOLE are no longer GNU extensions only.
>
> --
> Regards,
> Christian
>
>
On Feb 14 14:57, Christian Franke wrote:
> https://pubs.opengroup.org/onlinepubs/9799919799/functions/lseek.html
>
> Signed-off-by: Christian Franke <christian.franke@t-online.de>
> ---
> newlib/libc/include/sys/unistd.h | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
Pushed.
Thanks,
Corinna
@@ -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