Sync: Fix windows build, as discussed with Edouard.
authorMarkus Schaber <markus@pep-security.net>
Fri, 07 Oct 2016 21:51:08 +0200
changeset 12589c376b153898
parent 1257 0c12d65fe859
child 1259 e5bc79871fbb
Sync: Fix windows build, as discussed with Edouard.
src/platform_windows.cpp
src/platform_windows.h
src/sync_fsm.c
     1.1 --- a/src/platform_windows.cpp	Fri Oct 07 17:39:48 2016 +0200
     1.2 +++ b/src/platform_windows.cpp	Fri Oct 07 21:51:08 2016 +0200
     1.3 @@ -299,4 +299,8 @@
     1.4      }
     1.5  }
     1.6  
     1.7 +time_t timegm(struct tm* tm) {
     1.8 +    return _mkgmtime(tm);
     1.9 +}
    1.10 +
    1.11  } // "C"
     2.1 --- a/src/platform_windows.h	Fri Oct 07 17:39:48 2016 +0200
     2.2 +++ b/src/platform_windows.h	Fri Oct 07 21:51:08 2016 +0200
     2.3 @@ -16,6 +16,7 @@
     2.4  #include <string.h>
     2.5  #include <io.h>
     2.6  #include <basetsd.h>
     2.7 +#include <time.h>
     2.8  
     2.9  #ifdef __cplusplus
    2.10  extern "C" {
    2.11 @@ -30,6 +31,8 @@
    2.12  void *dlsym(void *handle, const char *symbol);
    2.13  int mkstemp(char *templ);
    2.14  
    2.15 +time_t timegm(struct tm* tm);
    2.16 +
    2.17  #ifndef strdup
    2.18  #define strdup(A) _strdup((A))
    2.19  #endif
    2.20 @@ -66,6 +69,7 @@
    2.21  const char *windoze_local_db(void);
    2.22  const char *windoze_system_db(void);
    2.23  const char *gpg_conf(void);
    2.24 +const char *gpg_agent_conf(void);
    2.25  
    2.26  long random(void);
    2.27  
     3.1 --- a/src/sync_fsm.c	Fri Oct 07 17:39:48 2016 +0200
     3.2 +++ b/src/sync_fsm.c	Fri Oct 07 21:51:08 2016 +0200
     3.3 @@ -1,4 +1,5 @@
     3.4  #include "sync_fsm.h"
     3.5 +#include <stdio.h>
     3.6  
     3.7  // state machine for DeviceState
     3.8