diff options
Diffstat (limited to 'include/ruby/win32.h')
-rw-r--r-- | include/ruby/win32.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/include/ruby/win32.h b/include/ruby/win32.h index a7d07083af..7c0da1f49f 100644 --- a/include/ruby/win32.h +++ b/include/ruby/win32.h @@ -27,8 +27,14 @@ extern "C" { // #include <stdarg.h> conflict with varargs.h? #if !defined(WSAAPI) +#if defined(__cplusplus) && defined(_MSC_VER) +extern "C++" { /* template without extern "C++" */ +#endif #include <winsock2.h> #include <ws2tcpip.h> +#if defined(__cplusplus) && defined(_MSC_VER) +} +#endif #endif #define NT 1 /* deprecated */ |