Skip to content

Commit

Permalink
add SEEK_DATA and SEEK_HOLE to unistd.h
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
Érico Nogueira authored and richfelker committed Jan 9, 2022
1 parent c4d4028 commit cbacd63
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions include/unistd.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit cbacd63

Please sign in to comment.