diff options
author | Tavian Barnes <tavianator@tavianator.com> | 2023-01-22 14:20:51 -0500 |
---|---|---|
committer | Tavian Barnes <tavianator@tavianator.com> | 2023-01-22 14:20:51 -0500 |
commit | d2f3a10f4373610e912e586814e26e2a06fd7d88 (patch) | |
tree | 533f24bf1bc9594f8af11ebae1a72b9ff710897b /src | |
parent | ca00b621eba1bf8b2a591b943090ac8af605922d (diff) | |
download | bfs-d2f3a10f4373610e912e586814e26e2a06fd7d88.tar.xz |
bfstd: Add O_SEARCH/O_EXEC fallbacks
Diffstat (limited to 'src')
-rw-r--r-- | src/bfstd.h | 16 |
1 files changed, 16 insertions, 0 deletions
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 <fcntl.h> +#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 |