summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorhsbt <hsbt@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2015-10-24 13:51:25 +0000
committerhsbt <hsbt@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2015-10-24 13:51:25 +0000
commit5d5315ad3b4cdfb87fb27955dfef96085cd4fcb2 (patch)
tree77947a2da2f8d1d992d52ded659a38b790bec3c1
parent96ff94c95de5ba5160bba12dbe4949558d59a8f4 (diff)
* 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
-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 1cb0d05..f9d6f90 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 20586d7..786b538 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 6d6d11f..dcd1cea 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 d54a7c8..37f926f 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 22a61e3..601667d 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