diff --git a/common/dynload.h b/common/dynload.h index 54a47b219..f6ec8753b 100644 --- a/common/dynload.h +++ b/common/dynload.h @@ -34,7 +34,9 @@ #ifndef __MINGW32__ # include #else -# include +# include +# include +# include # include "utf8conv.h" # include "mischelp.h" # define RTLD_LAZY 0 diff --git a/common/exechelp-w32.c b/common/exechelp-w32.c index 92be5cd52..dee96f5b4 100644 --- a/common/exechelp-w32.c +++ b/common/exechelp-w32.c @@ -65,6 +65,8 @@ #include "sysutils.h" #include "exechelp.h" +#include + /* Define to 1 do enable debugging. */ #define DEBUG_W32_SPAWN 0 diff --git a/common/gettime.c b/common/gettime.c index 03c152fdb..cbf24364e 100644 --- a/common/gettime.c +++ b/common/gettime.c @@ -42,6 +42,10 @@ #include "i18n.h" #include "gettime.h" +#ifdef HAVE_W32_SYSTEM +#include +#endif + #ifdef HAVE_UNSIGNED_TIME_T # define IS_INVALID_TIME_T(a) ((a) == (time_t)(-1)) #else diff --git a/common/utf8conv.c b/common/utf8conv.c index bdab225a9..1f01841c7 100644 --- a/common/utf8conv.c +++ b/common/utf8conv.c @@ -55,6 +55,10 @@ #include "stringhelp.h" #include "utf8conv.h" +#ifdef HAVE_W32_SYSTEM +#include +#endif + #ifndef MB_LEN_MAX #define MB_LEN_MAX 16 #endif diff --git a/configure.ac b/configure.ac index fea504e74..313b11358 100644 --- a/configure.ac +++ b/configure.ac @@ -806,6 +806,7 @@ if test "$have_w32_system" = yes; then if test "$have_w32ce_system" = yes; then AC_DEFINE(HAVE_W32CE_SYSTEM,1,[Defined if we run on WindowsCE]) fi + AC_CHECK_HEADERS([winsock2.h]) fi AM_CONDITIONAL(HAVE_W32_SYSTEM, test "$have_w32_system" = yes) AM_CONDITIONAL(HAVE_W32CE_SYSTEM, test "$have_w32ce_system" = yes) @@ -1385,7 +1386,6 @@ AC_CHECK_DECLS([sys_siglist],[],[],[#include ]) -gl_HEADER_SYS_SOCKET gl_TYPE_SOCKLEN_T AC_SEARCH_LIBS([inet_addr], [nsl]) diff --git a/tests/gpgscm/ffi.c b/tests/gpgscm/ffi.c index dde5b5282..9baf11e1d 100644 --- a/tests/gpgscm/ffi.c +++ b/tests/gpgscm/ffi.c @@ -45,6 +45,10 @@ #include "../../common/exechelp.h" #include "../../common/sysutils.h" +#ifdef HAVE_W32_SYSTEM +#include +#endif + #include "private.h" #include "ffi.h" #include "ffi-private.h" diff --git a/tools/gpgconf.c b/tools/gpgconf.c index 31847452b..093468eb3 100644 --- a/tools/gpgconf.c +++ b/tools/gpgconf.c @@ -35,6 +35,9 @@ #include "../common/status.h" #include "../common/exechelp.h" +#ifdef HAVE_W32_SYSTEM +#include +#endif /* Constants to identify the commands and options. */ enum cmd_and_opt_values