Allow compiling the Syncthing library interface with MSVC

I haven't tested linking and execution yet; it would probably require to
use e.g. `mingw-w64-ucrt-x86_64-go` from MSYS2 (instead of
`mingw-w64-x86_64-go` where the stdlib clashes).
This commit is contained in:
Martchus 2023-12-30 19:23:56 +01:00
parent bf884ba4cb
commit 8aefad41ab
1 changed files with 5 additions and 0 deletions

View File

@ -10,6 +10,11 @@
#define __declspec(foo)
#endif
// enforce use of the C header for complex types as cgo's typedefs rely on it
#ifdef _MSC_VER
#define _CRT_USE_C_COMPLEX_H
#endif
#include "libsyncthinginternal.h"
#include <atomic>