Fix Windows build (inc. roken.h before assert.h)

The build was failing at lib/hcrypto/evp-pkcs11.c because roken.h was
being included after <assert.h>.  It's not clear why that would be a
problem.

Here are some of the errors and warnings that resulted from including
<roken.h> after <assert.h> in evp-pkcs11.c:

evp-pkcs11.c                                                                                                                                      C:\Program Files\Microsoft SDKs\Windows\v7.1\INCLUDE\ws2def.h(91) : warning C4005: 'AF_IPX' : macro redefinition                           s              C:\Program Files\Microsoft SDKs\Windows\v7.1\INCLUDE\winsock.h(460) : see previous definition of 'AF_IPX'
C:\Program Files\Microsoft SDKs\Windows\v7.1\INCLUDE\ws2def.h(124) : warning C4005: 'AF_MAX' : macro redefinition
        C:\Program Files\Microsoft SDKs\Windows\v7.1\INCLUDE\winsock.h(479) : see previous definition of 'AF_MAX'
C:\Program Files\Microsoft SDKs\Windows\v7.1\INCLUDE\ws2def.h(168) : warning C4005: 'SO_DONTLINGER' : macro redefinition
        C:\Program Files\Microsoft SDKs\Windows\v7.1\INCLUDE\winsock.h(402) : see previous definition of 'SO_DONTLINGER'
C:\Program Files\Microsoft SDKs\Windows\v7.1\INCLUDE\ws2def.h(212) : error C2011: 'sockaddr' : 'struct' type redefinition
        C:\Program Files\Microsoft SDKs\Windows\v7.1\INCLUDE\winsock.h(485) : see declaration of 'sockaddr'
C:\Program Files\Microsoft SDKs\Windows\v7.1\INCLUDE\ws2def.h(390) : error C2059: syntax error : 'constant'
C:\Program Files\Microsoft SDKs\Windows\v7.1\INCLUDE\ws2def.h(524) : warning C4005: 'IN_CLASSA' : macro redefinition
        C:\Program Files\Microsoft SDKs\Windows\v7.1\INCLUDE\winsock.h(287) : see previous definition of 'IN_CLASSA'
This commit is contained in:
Nicolas Williams
2016-01-18 11:00:32 -06:00
parent bfd72f9ed5
commit 62f797ed4e

View File

@@ -31,6 +31,7 @@
/* PKCS#11 provider */ /* PKCS#11 provider */
#include "config.h" #include "config.h"
#include <roken.h>
#include <assert.h> #include <assert.h>
#ifdef HAVE_DLFCN_H #ifdef HAVE_DLFCN_H
@@ -51,7 +52,6 @@
#error PKCS11 support requires dlfcn.h #error PKCS11 support requires dlfcn.h
#endif #endif
#include <roken.h>
#include <heimbase.h> #include <heimbase.h>
#include <evp.h> #include <evp.h>