summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog8
-rw-r--r--configure.in13
-rw-r--r--ext/socket/getaddrinfo.c2
-rw-r--r--ext/socket/getnameinfo.c2
-rw-r--r--ext/socket/rubysocket.h3
5 files changed, 14 insertions, 14 deletions
diff --git a/ChangeLog b/ChangeLog
index 1cb0d0597d..f9d6f90edb 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+Sat Oct 24 22:51:18 2015 SHIBATA Hiroshi <hsbt@ruby-lang.org>
+
+ * 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.
+
Sat Oct 24 21:16:53 2015 Nobuyoshi Nakada <nobu@ruby-lang.org>
* test/fileutils/test_fileutils.rb (test_uptodate): relax error
diff --git a/configure.in b/configure.in
index 20586d7ac1..786b538b89 100644
--- a/configure.in
+++ b/configure.in
@@ -3055,7 +3055,7 @@ if test "$with_dln_a_out" != yes; then
[bsdi3*], [ AS_CASE(["$CC"],
[*shlicc*], [ : ${LDSHARED='$(CC) -r'}
rb_cv_dlopen=yes])],
- [linux* | gnu* | k*bsd*-gnu | netbsd* | bsdi* | kopensolaris*-gnu], [
+ [linux* | gnu* | k*bsd*-gnu | netbsd* | bsdi* | kopensolaris*-gnu | haiku*], [
: ${LDSHARED='$(CC) -shared'}
if test "$rb_cv_binary_elf" = yes; then
LDFLAGS="$LDFLAGS -Wl,-export-dynamic"
@@ -3109,17 +3109,6 @@ if test "$with_dln_a_out" != yes; then
])
: ${LIBPATHENV=LIBRARY_PATH}
rb_cv_dlopen=yes],
- [haiku*], [ AS_CASE(["$target_cpu"],
- [powerpc*], [
- : ${LDSHARED='$(LD) -xms'}
- EXTDLDFLAGS='-export $(TARGET_ENTRY)'
- DLDFLAGS="$DLDFLAGS -lroot glue-noinit.a init_term_dyn.o start_dyn.o"
- ],
- [i586*], [
- : ${LDSHARED='$(CC) -shared'}
- ])
- : ${LIBPATHENV=LIBRARY_PATH}
- rb_cv_dlopen=yes ],
[nto-qnx*], [ DLDFLAGS="$DLDFLAGS -L/lib -L/usr/lib -L/usr/local/lib"
: ${LDSHARED='$(LD) -Bshareable -x'}
LDFLAGS="$LDFLAGS -L/lib -L/usr/lib -L/usr/local/lib"
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