From 321fa87d7e86b23059ccaeebaaa699d2501a21d4 Mon Sep 17 00:00:00 2001 From: Fabrice Fontaine Date: Sun, 21 Jun 2020 19:16:58 +0200 Subject: [PATCH] utils.c: fix build on uclibc Neither uClibc nor uClibc-ng support O_TMPFILE. Define it in utils.c if not defined. Signed-off-by: Fabrice Fontaine --- utils.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/utils.c b/utils.c index 43073f1..3d0e0aa 100644 --- a/utils.c +++ b/utils.c @@ -46,6 +46,11 @@ # define __NR_openat2 437 #endif +/* uClibc and uClibc-ng don't provide O_TMPFILE */ +#ifndef O_TMPFILE +# define O_TMPFILE (020000000 | O_DIRECTORY) +#endif + /* List of all valid flags for the open/openat flags argument: */ #define VALID_OPEN_FLAGS \ (O_RDONLY | O_WRONLY | O_RDWR | O_CREAT | O_EXCL | O_NOCTTY | O_TRUNC | \