diff options
author | hsbt <hsbt@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2015-10-24 13:51:25 +0000 |
---|---|---|
committer | hsbt <hsbt@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2015-10-24 13:51:25 +0000 |
commit | 5d5315ad3b4cdfb87fb27955dfef96085cd4fcb2 (patch) | |
tree | 77947a2da2f8d1d992d52ded659a38b790bec3c1 /ext | |
parent | 96ff94c95de5ba5160bba12dbe4949558d59a8f4 (diff) | |
download | ruby-5d5315ad3b4cdfb87fb27955dfef96085cd4fcb2.tar.gz |
* configure.in: fixed build failure of Haiku.
[fix GH-984] Patch by @kallisti5
* ext/socket/getaddrinfo.c: ditto.
* ext/socket/getnameinfo.c: ditto.
* ext/socket/rubysocket.h: ditto.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52270 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ext')
-rw-r--r-- | ext/socket/getaddrinfo.c | 2 | ||||
-rw-r--r-- | ext/socket/getnameinfo.c | 2 | ||||
-rw-r--r-- | ext/socket/rubysocket.h | 3 |
3 files changed, 5 insertions, 2 deletions
diff --git a/ext/socket/getaddrinfo.c b/ext/socket/getaddrinfo.c index 6d6d11fa8f..dcd1cea0df 100644 --- a/ext/socket/getaddrinfo.c +++ b/ext/socket/getaddrinfo.c @@ -45,7 +45,7 @@ #include <sys/types.h> #ifndef _WIN32 #include <sys/param.h> -#if defined(__BEOS__) && !defined(__HAIKU__) && !defined(BONE) +#if defined(__BEOS__) && !defined(BONE) # include <net/socket.h> #else # include <sys/socket.h> diff --git a/ext/socket/getnameinfo.c b/ext/socket/getnameinfo.c index d54a7c8c0d..37f926f793 100644 --- a/ext/socket/getnameinfo.c +++ b/ext/socket/getnameinfo.c @@ -41,7 +41,7 @@ #include <stdio.h> #include <sys/types.h> #ifndef _WIN32 -#if defined(__BEOS__) && !defined(__HAIKU__) && !defined(BONE) +#if defined(__BEOS__) && !defined(BONE) # include <net/socket.h> #else # include <sys/socket.h> diff --git a/ext/socket/rubysocket.h b/ext/socket/rubysocket.h index 22a61e3777..601667d59d 100644 --- a/ext/socket/rubysocket.h +++ b/ext/socket/rubysocket.h @@ -80,6 +80,9 @@ #endif #ifdef HAVE_IFADDRS_H +# ifdef __HAIKU__ +# define _BSD_SOURCE +# endif # include <ifaddrs.h> #endif #ifdef HAVE_SYS_IOCTL_H |