Fix warnings on Windows.
authorThomas Munro <[email protected]>
Wed, 20 Jul 2022 04:09:50 +0000 (16:09 +1200)
committerThomas Munro <[email protected]>
Wed, 20 Jul 2022 04:09:50 +0000 (16:09 +1200)
Avoid macro redefinition warnings.

Reported-by: David Rowley <[email protected]>
Discussion: https://postgr.es/m/CAApHDvocHp4SXcPeMTwFiCQGaf9JypjTJ3Bh90jcPuGwxyDjjQ%40mail.gmail.com

src/include/port/win32_port.h

index 5ea66528fadfeaa23481ff49f5abb9ef4e285d10..4de5bf3bf606c37ecf7fb612fd8d7c1f285959fe 100644 (file)
@@ -87,7 +87,9 @@
  * We have a replacement for fdatasync() in src/port/fdatasync.c, which is
  * unconditionally used by MSVC and Mingw builds.
  */
+#ifndef HAVE_FDATASYNC
 #define HAVE_FDATASYNC
+#endif
 
 #define USES_WINSOCK