From 05b11809bd11450aff3d20e43f18415ce58601e7 Mon Sep 17 00:00:00 2001 From: Waldemar Brodkorb Date: Wed, 24 Jul 2024 09:40:43 +0200 Subject: add SEEK_DATA/SEEK_HOLE --- include/stdio.h | 5 ++++- include/unistd.h | 4 ++++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/include/stdio.h b/include/stdio.h index 0915da909..a48fa9b78 100644 --- a/include/stdio.h +++ b/include/stdio.h @@ -110,7 +110,10 @@ typedef __STDIO_fpos64_t fpos64_t; #define SEEK_SET 0 /* Seek from beginning of file. */ #define SEEK_CUR 1 /* Seek from current position. */ #define SEEK_END 2 /* Seek from end of file. */ - +#ifdef __USE_GNU +# define SEEK_DATA 3 /* Seek to next data. */ +# define SEEK_HOLE 4 /* Seek to next hole. */ +#endif #if defined __USE_SVID || defined __USE_XOPEN /* Default path prefix for `mkstemp'. */ diff --git a/include/unistd.h b/include/unistd.h index 36cd5fcb5..d50e1e4d3 100644 --- a/include/unistd.h +++ b/include/unistd.h @@ -316,6 +316,10 @@ libc_hidden_proto(faccessat) # define SEEK_SET 0 /* Seek from beginning of file. */ # define SEEK_CUR 1 /* Seek from current position. */ # define SEEK_END 2 /* Seek from end of file. */ +# ifdef __USE_GNU +# define SEEK_DATA 3 /* Seek to next data. */ +# define SEEK_HOLE 4 /* Seek to next hole. */ +# endif #endif #if defined __USE_BSD && !defined L_SET -- cgit v1.2.3