diff options
-rw-r--r-- | src/makefile | 2 | ||||
-rw-r--r-- | src/unix.h | 6 |
2 files changed, 7 insertions, 1 deletions
diff --git a/src/makefile b/src/makefile index f7b0401..313ca51 100644 --- a/src/makefile +++ b/src/makefile | |||
@@ -131,6 +131,7 @@ O_macosx=o | |||
131 | CC_macosx=gcc | 131 | CC_macosx=gcc |
132 | DEF_macosx= -DLUASOCKET_$(DEBUG) -DUNIX_HAS_SUN_LEN -DLUA_$(COMPAT)_MODULE \ | 132 | DEF_macosx= -DLUASOCKET_$(DEBUG) -DUNIX_HAS_SUN_LEN -DLUA_$(COMPAT)_MODULE \ |
133 | -DLUASOCKET_API='__attribute__((visibility("default")))' \ | 133 | -DLUASOCKET_API='__attribute__((visibility("default")))' \ |
134 | -DUNIX_API='__attribute__((visibility("default")))' \ | ||
134 | -DMIME_API='__attribute__((visibility("default")))' | 135 | -DMIME_API='__attribute__((visibility("default")))' |
135 | CFLAGS_macosx= -I$(LUAINC) $(DEF) -pedantic -Wall -O2 -fno-common \ | 136 | CFLAGS_macosx= -I$(LUAINC) $(DEF) -pedantic -Wall -O2 -fno-common \ |
136 | -fvisibility=hidden | 137 | -fvisibility=hidden |
@@ -146,6 +147,7 @@ O_linux=o | |||
146 | CC_linux=gcc | 147 | CC_linux=gcc |
147 | DEF_linux=-DLUASOCKET_$(DEBUG) -DLUA_$(COMPAT)_MODULE \ | 148 | DEF_linux=-DLUASOCKET_$(DEBUG) -DLUA_$(COMPAT)_MODULE \ |
148 | -DLUASOCKET_API='__attribute__((visibility("default")))' \ | 149 | -DLUASOCKET_API='__attribute__((visibility("default")))' \ |
150 | -DUNIX_API='__attribute__((visibility("default")))' \ | ||
149 | -DMIME_API='__attribute__((visibility("default")))' | 151 | -DMIME_API='__attribute__((visibility("default")))' |
150 | CFLAGS_linux= -I$(LUAINC) $(DEF) -pedantic -Wall -Wshadow -Wextra \ | 152 | CFLAGS_linux= -I$(LUAINC) $(DEF) -pedantic -Wall -Wshadow -Wextra \ |
151 | -Wimplicit -O2 -ggdb3 -fpic -fvisibility=hidden | 153 | -Wimplicit -O2 -ggdb3 -fpic -fvisibility=hidden |
@@ -13,6 +13,10 @@ | |||
13 | #include "timeout.h" | 13 | #include "timeout.h" |
14 | #include "socket.h" | 14 | #include "socket.h" |
15 | 15 | ||
16 | #ifndef UNIX_API | ||
17 | #define UNIX_API extern | ||
18 | #endif | ||
19 | |||
16 | typedef struct t_unix_ { | 20 | typedef struct t_unix_ { |
17 | t_socket sock; | 21 | t_socket sock; |
18 | t_io io; | 22 | t_io io; |
@@ -21,6 +25,6 @@ typedef struct t_unix_ { | |||
21 | } t_unix; | 25 | } t_unix; |
22 | typedef t_unix *p_unix; | 26 | typedef t_unix *p_unix; |
23 | 27 | ||
24 | LUASOCKET_API int luaopen_socket_unix(lua_State *L); | 28 | UNIX_API int luaopen_socket_unix(lua_State *L); |
25 | 29 | ||
26 | #endif /* UNIX_H */ | 30 | #endif /* UNIX_H */ |