From 97e994a1f96c025bf9d1c3e55f1118c0c58e81ae Mon Sep 17 00:00:00 2001 From: Xiang Xiao Date: Sun, 5 Feb 2023 03:13:05 +0800 Subject: [PATCH] Move SEEK_xxx from unistd.h to sys/types.h so fcntl.h, stdio.h and unistd.h could get these definiton: https://en.cppreference.com/w/c/io/fseek https://pubs.opengroup.org/onlinepubs/7908799/xsh/fcntl.html https://pubs.opengroup.org/onlinepubs/007904975/functions/lseek.html Signed-off-by: Xiang Xiao --- include/sys/types.h | 6 ++++++ include/unistd.h | 6 ------ 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/include/sys/types.h b/include/sys/types.h index 28a524d26cd..d9dda31fcae 100644 --- a/include/sys/types.h +++ b/include/sys/types.h @@ -60,6 +60,12 @@ # endif #endif +/* Values for seeking */ + +#define SEEK_SET 0 /* From the start of the file */ +#define SEEK_CUR 1 /* From the current file offset */ +#define SEEK_END 2 /* From the end of the file */ + #ifndef CONFIG_SMP_NCPUS # define CONFIG_SMP_NCPUS 1 #endif diff --git a/include/unistd.h b/include/unistd.h index 4c49eaabd2a..b2d4ec091e2 100644 --- a/include/unistd.h +++ b/include/unistd.h @@ -33,12 +33,6 @@ * Pre-processor Definitions ****************************************************************************/ -/* Values for seeking */ - -#define SEEK_SET 0 /* From the start of the file */ -#define SEEK_CUR 1 /* From the current file offset */ -#define SEEK_END 2 /* From the end of the file */ - /* Bit values for the second argument to access */ #define F_OK 0 /* Test existence */