From addbec9591b130db56b92d43b417907532ccacc4 Mon Sep 17 00:00:00 2001 From: Chris Friedt Date: Fri, 2 Dec 2022 17:44:54 -0500 Subject: [PATCH] libc: minimal: stdio.h: define SEEK_SET, SEEK_CUR, SEEK_END The `SEEK_SET`, `SEEK_CUR`, and `SEEK_END` constants are defined in ``, not in ``. Signed-off-by: Chris Friedt --- include/zephyr/posix/sys/stat.h | 4 ---- lib/libc/minimal/include/stdio.h | 4 ++++ 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/include/zephyr/posix/sys/stat.h b/include/zephyr/posix/sys/stat.h index cac5aba27d4..2ab436c2f06 100644 --- a/include/zephyr/posix/sys/stat.h +++ b/include/zephyr/posix/sys/stat.h @@ -40,10 +40,6 @@ extern "C" { #define O_WRONLY 01 #define O_RDWR 02 -#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. */ - struct stat { unsigned long st_size; unsigned long st_blksize; diff --git a/lib/libc/minimal/include/stdio.h b/lib/libc/minimal/include/stdio.h index 38968cf623f..1d8b7ce6b2f 100644 --- a/lib/libc/minimal/include/stdio.h +++ b/lib/libc/minimal/include/stdio.h @@ -30,6 +30,10 @@ typedef int FILE; #define stdout ((FILE *) 2) #define stderr ((FILE *) 3) +#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. */ + int __printf_like(1, 2) printf(const char *ZRESTRICT format, ...); int __printf_like(3, 4) snprintf(char *ZRESTRICT str, size_t len, const char *ZRESTRICT format, ...);