Skip to content

Commit 036b689

Browse files
committed
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
1 parent 786363e commit 036b689

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

mysys/mysys_priv.h

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,9 +89,13 @@ void sf_free(void *ptr);
8989

9090
void my_error_unregister_all(void);
9191

92-
#if !defined(O_PATH) && defined(O_EXEC) /* FreeBSD */
92+
#ifndef O_PATH /* not Linux */
93+
#if defined(O_SEARCH) /* Illumos */
94+
#define O_PATH O_SEARCH
95+
#elif defined(O_EXEC) /* FreeBSD */
9396
#define O_PATH O_EXEC
9497
#endif
98+
#endif
9599

96100
#ifdef O_PATH
97101
#define HAVE_OPEN_PARENT_DIR_NOSYMLINKS

0 commit comments

Comments
 (0)