diff options
author | unknown <diego.nehab@gmail.com> | 2013-05-30 16:50:28 +0800 |
---|---|---|
committer | unknown <diego.nehab@gmail.com> | 2013-05-30 16:50:28 +0800 |
commit | 5eefc73b572e591bd127b8c2873f0fa9522dc0b9 (patch) | |
tree | 5dbd3040b73a40d13174335fcb6b91d497ce36b4 /src/usocket.h | |
parent | a233e27865d96566a6cb13960d08605ce34d9f0d (diff) | |
download | luasocket-5eefc73b572e591bd127b8c2873f0fa9522dc0b9.tar.gz luasocket-5eefc73b572e591bd127b8c2873f0fa9522dc0b9.tar.bz2 luasocket-5eefc73b572e591bd127b8c2873f0fa9522dc0b9.zip |
Remove warnings. Move windows specific code.
Diffstat (limited to 'src/usocket.h')
-rw-r--r-- | src/usocket.h | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/src/usocket.h b/src/usocket.h index 8b3241b..45f2f99 100644 --- a/src/usocket.h +++ b/src/usocket.h | |||
@@ -29,11 +29,27 @@ | |||
29 | #include <arpa/inet.h> | 29 | #include <arpa/inet.h> |
30 | /* TCP options (nagle algorithm disable) */ | 30 | /* TCP options (nagle algorithm disable) */ |
31 | #include <netinet/tcp.h> | 31 | #include <netinet/tcp.h> |
32 | #include <net/if.h> | ||
32 | 33 | ||
33 | #ifndef SO_REUSEPORT | 34 | #ifndef SO_REUSEPORT |
34 | #define SO_REUSEPORT SO_REUSEADDR | 35 | #define SO_REUSEPORT SO_REUSEADDR |
35 | #endif | 36 | #endif |
36 | 37 | ||
38 | /* Some platforms use IPV6_JOIN_GROUP instead if | ||
39 | * IPV6_ADD_MEMBERSHIP. The semantics are same, though. */ | ||
40 | #ifndef IPV6_ADD_MEMBERSHIP | ||
41 | #ifdef IPV6_JOIN_GROUP | ||
42 | #define IPV6_ADD_MEMBERSHIP IPV6_JOIN_GROUP | ||
43 | #endif /* IPV6_JOIN_GROUP */ | ||
44 | #endif /* !IPV6_ADD_MEMBERSHIP */ | ||
45 | |||
46 | /* Same with IPV6_DROP_MEMBERSHIP / IPV6_LEAVE_GROUP. */ | ||
47 | #ifndef IPV6_DROP_MEMBERSHIP | ||
48 | #ifdef IPV6_LEAVE_GROUP | ||
49 | #define IPV6_DROP_MEMBERSHIP IPV6_LEAVE_GROUP | ||
50 | #endif /* IPV6_LEAVE_GROUP */ | ||
51 | #endif /* !IPV6_DROP_MEMBERSHIP */ | ||
52 | |||
37 | typedef int t_socket; | 53 | typedef int t_socket; |
38 | typedef t_socket *p_socket; | 54 | typedef t_socket *p_socket; |
39 | typedef struct sockaddr_storage t_sockaddr_storage; | 55 | typedef struct sockaddr_storage t_sockaddr_storage; |