libwinpr-sspi: fix build on Linux

This commit is contained in:
Marc-André Moreau 2012-12-23 18:59:59 -05:00
parent a5aa8fc2cc
commit 5240823124
3 changed files with 13 additions and 2 deletions

View File

@ -635,12 +635,20 @@ struct _SecHandle
ULONG_PTR dwUpper;
};
typedef struct _SecHandle SecHandle;
typedef SecHandle* PSecHandle;
typedef SecHandle CredHandle;
typedef CredHandle* PCredHandle;
typedef SecHandle CtxtHandle;
typedef CtxtHandle* PCtxtHandle;
#define SecInvalidateHandle(x) \
((PSecHandle)(x))->dwLower = ((PSecHandle)(x))->dwUpper = ((ULONG_PTR)((INT_PTR) - 1));
#define SecIsValidHandle(x) \
((((PSecHandle)(x))->dwLower != ((ULONG_PTR)((INT_PTR) - 1))) && \
(((PSecHandle) (x))->dwUpper != ((ULONG_PTR)((INT_PTR) - 1))))
#endif
#define SECBUFFER_VERSION 0

View File

@ -24,7 +24,7 @@ endif()
set_complex_link_libraries(VARIABLE ${MODULE_PREFIX}_LIBS
MONOLITHIC ${MONOLITHIC_BUILD}
MODULE winpr
MODULES winpr-sspi winpr-thread)
MODULES winpr-sspi winpr-thread winpr-pipe winpr-file winpr-utils)
target_link_libraries(${MODULE_NAME} ${${MODULE_PREFIX}_LIBS})

View File

@ -1,7 +1,10 @@
#include <winpr/crt.h>
#include <winpr/sspi.h>
#include <winpr/file.h>
#include <winpr/pipe.h>
#include <winpr/print.h>
#include <winpr/synch.h>
#include <winpr/thread.h>
#include <winpr/schannel.h>
@ -20,7 +23,7 @@ static void* schannel_test_server_thread(void* arg)
SCHANNEL_CRED cred;
CtxtHandle context;
CredHandle credentials;
PSecBuffer pSecBuffer;
//PSecBuffer pSecBuffer;
SecBuffer SecBuffer_in[2];
SecBuffer SecBuffer_out[2];
SecBufferDesc SecBufferDesc_in;