mailing list of musl libc
 help / color / mirror / code / Atom feed
* [musl] [PATCH] add SEEK_DATA and SEEK_HOLE to <unistd.h>
@ 2021-12-17  7:59 Érico Nogueira
  2021-12-17  8:04 ` Érico Nogueira
  0 siblings, 1 reply; 2+ messages in thread
From: Érico Nogueira @ 2021-12-17  7:59 UTC (permalink / raw)
  To: musl; +Cc: Érico Nogueira

these are linux specific constants. glibc exposes them behind
_GNU_SOURCE, but, since SEEK_* is reserved for the implementation, we
can simply define them. furthermore, since they can't be used with
fseek() and other functions that deal with FILE, we don't add them to
<stdio.h>.
---
 include/unistd.h | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/include/unistd.h b/include/unistd.h
index ee2dbe8a..212263a7 100644
--- a/include/unistd.h
+++ b/include/unistd.h
@@ -14,6 +14,8 @@ extern "C" {
 #define SEEK_SET 0
 #define SEEK_CUR 1
 #define SEEK_END 2
+#define SEEK_DATA 3
+#define SEEK_HOLE 4
 
 #if __cplusplus >= 201103L
 #define NULL nullptr
-- 
2.34.1


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2021-12-17  8:04 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-12-17  7:59 [musl] [PATCH] add SEEK_DATA and SEEK_HOLE to <unistd.h> Érico Nogueira
2021-12-17  8:04 ` Érico Nogueira

Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/musl/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).