summaryrefslogtreecommitdiff
path: root/ext/socket/rubysocket.h
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2009-01-19 02:22:57 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2009-01-19 02:22:57 +0000
commit2aa6644acda2d59b5c2a77fa52404db80c8eb31b (patch)
tree2d0121929cb42fa9bf25f55db93a0a8122d789bf /ext/socket/rubysocket.h
parent651f0e48bb148cfbeb190bd92fa2da736dac0d6c (diff)
* ext/socket/rubysocket.h (rb_cUNIXSocket, rb_cUNIXServer),
(unixpath, unixaddr): UNIX domain sockets depend on sys/un.h. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@21658 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ext/socket/rubysocket.h')
-rw-r--r--ext/socket/rubysocket.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/ext/socket/rubysocket.h b/ext/socket/rubysocket.h
index bb2f6a6..365eab6 100644
--- a/ext/socket/rubysocket.h
+++ b/ext/socket/rubysocket.h
@@ -129,7 +129,7 @@ extern VALUE rb_cIPSocket;
extern VALUE rb_cTCPSocket;
extern VALUE rb_cTCPServer;
extern VALUE rb_cUDPSocket;
-#ifdef AF_UNIX
+#ifdef HAVE_SYS_UN_H
extern VALUE rb_cUNIXSocket;
extern VALUE rb_cUNIXServer;
#endif
@@ -177,8 +177,10 @@ VALUE make_ipaddr(struct sockaddr *addr);
VALUE ipaddr(struct sockaddr *sockaddr, int norevlookup);
VALUE make_hostent(VALUE host, struct addrinfo *addr, VALUE (*ipaddr)(struct sockaddr *, size_t));
+#ifdef HAVE_SYS_UN_H
const char* unixpath(struct sockaddr_un *sockaddr, socklen_t len);
VALUE unixaddr(struct sockaddr_un *sockaddr, socklen_t len);
+#endif
int ruby_socket(int domain, int type, int proto);
VALUE init_sock(VALUE sock, int fd);