Ver Fonte

fix failure of open to read variadic mode argument for O_TMPFILE

Rich Felker há 10 anos atrás
pai
commit
9d836ea7a6
1 ficheiros alterados com 1 adições e 1 exclusões
  1. 1 1
      src/fcntl/open.c

+ 1 - 1
src/fcntl/open.c

@@ -7,7 +7,7 @@ int open(const char *filename, int flags, ...)
 {
 	mode_t mode = 0;
 
-	if (flags & O_CREAT) {
+	if ((flags & O_CREAT) || (flags & O_TMPFILE) == O_TMPFILE) {
 		va_list ap;
 		va_start(ap, flags);
 		mode = va_arg(ap, mode_t);