]> git.ipfire.org Git - thirdparty/psycopg.git/commitdiff
Fix inclusion of sys/param.h on Windows compiler
authorDaniele Varrazzo <daniele.varrazzo@gmail.com>
Tue, 29 Jun 2021 02:47:40 +0000 (03:47 +0100)
committerDaniele Varrazzo <daniele.varrazzo@gmail.com>
Tue, 29 Jun 2021 12:47:15 +0000 (13:47 +0100)
The header is probably available on Cygwin but not on MSVC.

psycopg_c/psycopg_c/_psycopg/endian.pxd

index 43220fdb16a364284f106fee404b7942a992e3ef..ab848eedcf8bc0e3f851083c2987755ed34fb3a2 100644 (file)
@@ -72,7 +72,9 @@ cdef extern from * nogil:
 #elif defined(__WINDOWS__)
 
 #      include <winsock2.h>
-#      include <sys/param.h>
+#       ifndef _MSC_VER
+#          include <sys/param.h>
+#       endif
 
 #      if BYTE_ORDER == LITTLE_ENDIAN