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.
-#define _XOPEN_SOURCE 500
-#define _POSIX_C_SOURCE 200809
+#define _XOPEN_SOURCE 700
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
int drivefd = get_drive_fd(src);
return renameat(drivefd, srcunixfilename, drivefd, destunixfilename);
-}
\ No newline at end of file
+}