diff --git a/src/luasocket.h b/src/luasocket.h index f75d21f..0121a15 100644 --- a/src/luasocket.h +++ b/src/luasocket.h @@ -18,7 +18,19 @@ * This macro prefixes all exported API functions \*-------------------------------------------------------------------------*/ #ifndef LUASOCKET_API -#define LUASOCKET_API extern +#ifdef _WIN32 +#define LUASOCKET_API __declspec(dllexport) +#else +#define LUASOCKET_API __attribute__ ((visibility ("default"))) +#endif +#endif + +#ifndef LUASOCKET_PRIVATE +#ifdef _WIN32 +#define LUASOCKET_PRIVATE +#else +#define LUASOCKET_PRIVATE __attribute__ ((visibility ("hidden"))) +#endif #endif /*-------------------------------------------------------------------------*\