Adjust commit 2dbe8905 for ancient macOS.
authorThomas Munro <[email protected]>
Mon, 19 Jul 2021 04:29:17 +0000 (16:29 +1200)
committerThomas Munro <[email protected]>
Mon, 19 Jul 2021 04:50:21 +0000 (16:50 +1200)
A couple of open flags used in an assertion didn't exist in macOS 10.4.
Per build farm animal prairiedog.  Also add O_EXCL while here (there are
a few more standard flags but they're not relevant and likely to be
missing).

src/backend/storage/file/fd.c

index 0792c08ce1bf76b2971303c55f03dbd48fa4a110..abb054ad7f3799a98d1ce3dbaf922de0bae31ae0 100644 (file)
@@ -1065,9 +1065,14 @@ tryAgain:
     */
    StaticAssertStmt((PG_O_DIRECT &
                      (O_APPEND |
+#if defined(O_CLOEXEC)
                       O_CLOEXEC |
+#endif
                       O_CREAT |
+#if defined(O_DSYNC)
                       O_DSYNC |
+#endif
+                      O_EXCL |
                       O_RDWR |
                       O_RDONLY |
                       O_SYNC |