projects
/
libusual.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
53a8ed2
)
socket: define INADDR_NONE
author
Marko Kreen
<markokr@gmail.com>
Wed, 13 Jan 2010 08:01:12 +0000
(10:01 +0200)
committer
Marko Kreen
<markokr@gmail.com>
Wed, 13 Jan 2010 08:01:12 +0000
(10:01 +0200)
usual/socket.h
patch
|
blob
|
blame
|
history
diff --git
a/usual/socket.h
b/usual/socket.h
index 1ad5cc254bb19fc455043a077199de4e74216abe..f77f9c9891cb19dbbba3cd88cd0d7a7996741e64 100644
(file)
--- a/
usual/socket.h
+++ b/
usual/socket.h
@@
-52,6
+52,13
@@
#include <arpa/inet.h>
#endif
+/*
+ * Some systems (Solaris) does not define INADDR_NONE
+ */
+#ifndef INADDR_NONE
+#define INADDR_NONE ((unsigned long) -1)
+#endif
+
bool socket_setup(int sock, bool non_block);
bool socket_set_nonblocking(int sock, bool non_block);