tools/nolibc: Include linux/fcntl.h and remove duplicate code

Include linux/fcntl.h for O_* and AT_*. asm/fcntl.h is included
by linux/fcntl.h, so it can be safely removed.

Signed-off-by: Feiyang Chen <chenfeiyang@loongson.cn>
Acked-by: Huacai Chen <chenhuacai@loongson.cn>
Signed-off-by: Willy Tarreau <w@1wt.eu>
Signed-off-by: Paul E. McKenney <paulmck@kernel.org>
This commit is contained in:
Feiyang Chen 2023-03-04 15:28:43 +01:00 коммит произвёл Paul E. McKenney
Родитель 1c3a4c10cc
Коммит a438e528b6
2 изменённых файлов: 1 добавлений и 6 удалений

Просмотреть файл

@ -11,7 +11,6 @@
#include "std.h" #include "std.h"
/* system includes */ /* system includes */
#include <asm/fcntl.h> // for O_*
#include <asm/unistd.h> #include <asm/unistd.h>
#include <asm/signal.h> // for SIGCHLD #include <asm/signal.h> // for SIGCHLD
#include <asm/ioctls.h> #include <asm/ioctls.h>
@ -20,6 +19,7 @@
#include <linux/loop.h> #include <linux/loop.h>
#include <linux/time.h> #include <linux/time.h>
#include <linux/auxvec.h> #include <linux/auxvec.h>
#include <linux/fcntl.h> // for O_* and AT_*
#include "arch.h" #include "arch.h"
#include "errno.h" #include "errno.h"

Просмотреть файл

@ -81,11 +81,6 @@
#define MAXPATHLEN (PATH_MAX) #define MAXPATHLEN (PATH_MAX)
#endif #endif
/* Special FD used by all the *at functions */
#ifndef AT_FDCWD
#define AT_FDCWD (-100)
#endif
/* whence values for lseek() */ /* whence values for lseek() */
#define SEEK_SET 0 #define SEEK_SET 0
#define SEEK_CUR 1 #define SEEK_CUR 1