aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--include/enet/win32.h6
1 files changed, 4 insertions, 2 deletions
diff --git a/include/enet/win32.h b/include/enet/win32.h
index 0e1cf0c..b7b6816 100644
--- a/include/enet/win32.h
+++ b/include/enet/win32.h
@@ -5,12 +5,14 @@
#ifndef __ENET_WIN32_H__
#define __ENET_WIN32_H__
+#ifdef _MSC_VER
#ifdef ENET_BUILDING_LIB
#pragma warning (disable: 4996) // 'strncpy' was declared deprecated
#pragma warning (disable: 4267) // size_t to int conversion
#pragma warning (disable: 4244) // 64bit to 32bit int
#pragma warning (disable: 4018) // signed/unsigned mismatch
#endif
+#endif
#include <stdlib.h>
#include <winsock2.h>
@@ -36,8 +38,8 @@ typedef struct
#define ENET_CALLBACK __cdecl
-#if defined ENET_DLL
-#if defined ENET_BUILDING_LIB
+#ifdef ENET_DLL
+#ifdef ENET_BUILDING_LIB
#define ENET_API __declspec( dllexport )
#else
#define ENET_API __declspec( dllimport )