소스 검색

fix failure of open to read variadic mode argument for O_TMPFILE

Rich Felker 10 년 전
부모
커밋
9d836ea7a6
1개의 변경된 파일1개의 추가작업 그리고 1개의 파일을 삭제
  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);