aboutsummaryrefslogtreecommitdiff
path: root/src/usocket.h
diff options
context:
space:
mode:
authorunknown <diego.nehab@gmail.com>2013-05-30 16:50:28 +0800
committerunknown <diego.nehab@gmail.com>2013-05-30 16:50:28 +0800
commit5eefc73b572e591bd127b8c2873f0fa9522dc0b9 (patch)
tree5dbd3040b73a40d13174335fcb6b91d497ce36b4 /src/usocket.h
parenta233e27865d96566a6cb13960d08605ce34d9f0d (diff)
downloadluasocket-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.h16
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
37typedef int t_socket; 53typedef int t_socket;
38typedef t_socket *p_socket; 54typedef t_socket *p_socket;
39typedef struct sockaddr_storage t_sockaddr_storage; 55typedef struct sockaddr_storage t_sockaddr_storage;