Raise _XOPEN_SOURCE from 500 to 700
authorGeorge Koehler <kernigh@gmail.com>
Fri, 22 Mar 2019 18:35:07 +0000 (14:35 -0400)
committerGeorge Koehler <kernigh@gmail.com>
Fri, 22 Mar 2019 18:35:07 +0000 (14:35 -0400)
In OpenBSD, _XOPEN_SOURCE 500 forces _POSIX_C_SOURCE down to 199506,
which hides the declarations of openat() and fdopendir() and causes
compiler warnings.

Don't set _POSIX_C_SOURCE, because _XOPEN_SOURCE may set
_POSIX_C_SOURCE to a different value.

plat/cpm/emu/fileio.c

index a193805..d3df457 100644 (file)
@@ -1,5 +1,4 @@
-#define _XOPEN_SOURCE 500
-#define _POSIX_C_SOURCE 200809
+#define _XOPEN_SOURCE 700
 #include <stdio.h>
 #include <stdlib.h>
 #include <string.h>
@@ -440,4 +439,4 @@ int file_rename(cpm_filename_t* src, cpm_filename_t* dest)
 
        int drivefd = get_drive_fd(src);
        return renameat(drivefd, srcunixfilename, drivefd, destunixfilename);
-}
\ No newline at end of file
+}