diff --git a/ChangeLog b/ChangeLog index ff6de0a9c6..643a4da029 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +Mon Jan 19 11:22:51 2009 Nobuyoshi Nakada + + * ext/socket/rubysocket.h (rb_cUNIXSocket, rb_cUNIXServer), + (unixpath, unixaddr): UNIX domain sockets depend on sys/un.h. + Mon Jan 19 11:02:30 2009 Koichi Sasada * vm_dump.c: add a prefix "rb_vmdebug_" to diff --git a/ext/socket/rubysocket.h b/ext/socket/rubysocket.h index bb2f6a6896..365eab63da 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);