ruby-changes:40189
From: hsbt <ko1@a...>
Date: Sat, 24 Oct 2015 22:51:41 +0900 (JST)
Subject: [ruby-changes:40189] hsbt:r52270 (trunk): * configure.in: fixed build failure of Haiku.
hsbt 2015-10-24 22:51:25 +0900 (Sat, 24 Oct 2015) New Revision: 52270 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=52270 Log: * 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. Modified files: trunk/ChangeLog trunk/configure.in trunk/ext/socket/getaddrinfo.c trunk/ext/socket/getnameinfo.c trunk/ext/socket/rubysocket.h Index: configure.in =================================================================== --- configure.in (revision 52269) +++ configure.in (revision 52270) @@ -3055,7 +3055,7 @@ if test "$with_dln_a_out" != yes; then https://github.com/ruby/ruby/blob/trunk/configure.in#L3055 [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 https://github.com/ruby/ruby/blob/trunk/configure.in#L3109 ]) : ${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" Index: ChangeLog =================================================================== --- ChangeLog (revision 52269) +++ ChangeLog (revision 52270) @@ -1,3 +1,11 @@ https://github.com/ruby/ruby/blob/trunk/ChangeLog#L1 +Sat Oct 24 22:51:18 2015 SHIBATA Hiroshi <hsbt@r...> + + * 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@r...> * test/fileutils/test_fileutils.rb (test_uptodate): relax error Index: ext/socket/rubysocket.h =================================================================== --- ext/socket/rubysocket.h (revision 52269) +++ ext/socket/rubysocket.h (revision 52270) @@ -80,6 +80,9 @@ https://github.com/ruby/ruby/blob/trunk/ext/socket/rubysocket.h#L80 #endif #ifdef HAVE_IFADDRS_H +# ifdef __HAIKU__ +# define _BSD_SOURCE +# endif # include <ifaddrs.h> #endif #ifdef HAVE_SYS_IOCTL_H Index: ext/socket/getaddrinfo.c =================================================================== --- ext/socket/getaddrinfo.c (revision 52269) +++ ext/socket/getaddrinfo.c (revision 52270) @@ -45,7 +45,7 @@ https://github.com/ruby/ruby/blob/trunk/ext/socket/getaddrinfo.c#L45 #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> Index: ext/socket/getnameinfo.c =================================================================== --- ext/socket/getnameinfo.c (revision 52269) +++ ext/socket/getnameinfo.c (revision 52270) @@ -41,7 +41,7 @@ https://github.com/ruby/ruby/blob/trunk/ext/socket/getnameinfo.c#L41 #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> -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/