]> err.no Git - yubikey-personalization/commitdiff
Fix compilation under Windows.
authorSimon Josefsson <simon@yubico.com>
Thu, 25 Nov 2010 11:57:22 +0000 (11:57 +0000)
committerSimon Josefsson <simon@yubico.com>
Thu, 25 Nov 2010 11:57:22 +0000 (11:57 +0000)
ykcore/yktsd.h

index 834a719cb630e90b72b8685077af010b435e3c63..615e49a381f1c4faedf71592e091f63aa113cb62 100644 (file)
@@ -2,6 +2,7 @@
 /* Note: this file is copied from Levitte Programming's LPlib and reworked
    for ykcore */
 /*
+ * Copyright (c) 2010 Simon Josefsson <simon@josefsson.org>
  * Copyright (c) 2003, 2004 Richard Levitte <richard@levitte.org>.
  * All rights reserved.
  *
@@ -33,8 +34,9 @@
 /* Define thread-specific data primitives */
 #if defined _WIN32
 #include <windows.h>
+#include <errno.h>
 #define yk__TSD_TYPE                   DWORD
-#define yk__TSD_ALLOC(key)             ((key = TlsAlloc()) == TLS_OUT_OF_INDEXES ? EAGAIN : 0)
+#define yk__TSD_ALLOC(key,nop)         ((key = TlsAlloc()) == TLS_OUT_OF_INDEXES ? EAGAIN : 0)
 #define yk__TSD_FREE(key)              (!TlsFree(key))
 #define yk__TSD_SET(key,value)         (!TlsSetValue(key,value))
 #define yk__TSD_GET(key)               TlsGetValue(key)