Skip to content

Commit addbec9

Browse files
cfriedtstephanosio
authored andcommitted
libc: minimal: stdio.h: define SEEK_SET, SEEK_CUR, SEEK_END
The `SEEK_SET`, `SEEK_CUR`, and `SEEK_END` constants are defined in `<stdio.h>`, not in `<sys/stat.h>`. Signed-off-by: Chris Friedt <[email protected]>
1 parent a89d68d commit addbec9

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

include/zephyr/posix/sys/stat.h

-4
Original file line numberDiff line numberDiff line change
@@ -40,10 +40,6 @@ extern "C" {
4040
#define O_WRONLY 01
4141
#define O_RDWR 02
4242

43-
#define SEEK_SET 0 /* Seek from beginning of file. */
44-
#define SEEK_CUR 1 /* Seek from current position. */
45-
#define SEEK_END 2 /* Seek from end of file. */
46-
4743
struct stat {
4844
unsigned long st_size;
4945
unsigned long st_blksize;

lib/libc/minimal/include/stdio.h

+4
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,10 @@ typedef int FILE;
3030
#define stdout ((FILE *) 2)
3131
#define stderr ((FILE *) 3)
3232

33+
#define SEEK_SET 0 /* Seek from beginning of file. */
34+
#define SEEK_CUR 1 /* Seek from current position. */
35+
#define SEEK_END 2 /* Seek from end of file. */
36+
3337
int __printf_like(1, 2) printf(const char *ZRESTRICT format, ...);
3438
int __printf_like(3, 4) snprintf(char *ZRESTRICT str, size_t len,
3539
const char *ZRESTRICT format, ...);

0 commit comments

Comments
 (0)