MDEV-12310 openat(<directory>, ...O_EXEC) fails on Illumos / Solaris

it could be
* O_SEARCH on Illumos
* O_EXEC on FreeBSD
* O_PATH on Linux
ugh
This commit is contained in:
Sergei Golubchik 2017-04-18 11:29:02 +02:00
parent 786363e89b
commit 036b689f18

View file

@ -89,9 +89,13 @@ void sf_free(void *ptr);
void my_error_unregister_all(void);
#if !defined(O_PATH) && defined(O_EXEC) /* FreeBSD */
#ifndef O_PATH /* not Linux */
#if defined(O_SEARCH) /* Illumos */
#define O_PATH O_SEARCH
#elif defined(O_EXEC) /* FreeBSD */
#define O_PATH O_EXEC
#endif
#endif
#ifdef O_PATH
#define HAVE_OPEN_PARENT_DIR_NOSYMLINKS