From d2f3a10f4373610e912e586814e26e2a06fd7d88 Mon Sep 17 00:00:00 2001 From: Tavian Barnes Date: Sun, 22 Jan 2023 14:20:51 -0500 Subject: bfstd: Add O_SEARCH/O_EXEC fallbacks --- src/bfstd.h | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'src/bfstd.h') diff --git a/src/bfstd.h b/src/bfstd.h index d46fa02..79307cc 100644 --- a/src/bfstd.h +++ b/src/bfstd.h @@ -33,6 +33,22 @@ bool is_nonexistence_error(int error); #include +#ifndef O_EXEC +# ifdef O_PATH +# define O_EXEC O_PATH +# else +# define O_EXEC O_RDONLY +# endif +#endif + +#ifndef O_SEARCH +# ifdef O_PATH +# define O_SEARCH O_PATH +# else +# define O_SEARCH O_RDONLY +# endif +#endif + #ifndef O_DIRECTORY # define O_DIRECTORY 0 #endif -- cgit v1.2.3