librelist archives

« back to archive

[PATCH] extconf: -lnsl and -lsocket checks for OpenSolaris

[PATCH] extconf: -lnsl and -lsocket checks for OpenSolaris

From:
Eric Wong
Date:
2011-06-13 @ 21:39
I've just pushed this out to kgio.git

Can *BSD/OpenSolaris users make sure this doesn't break anything for
them?  Thanks!

From d224563823accca63fd871260e3f0dad6758c8d4 Mon Sep 17 00:00:00 2001
From: Eric Wong <normalperson@yhbt.net>
Date: Mon, 13 Jun 2011 14:26:10 -0700
Subject: [PATCH] extconf: -lnsl and -lsocket checks for OpenSolaris

Reported via private email.
---
 ext/kgio/extconf.rb |    6 ++++++
 1 files changed, 6 insertions(+), 0 deletions(-)

diff --git a/ext/kgio/extconf.rb b/ext/kgio/extconf.rb
index f988ce1..f277710 100644
--- a/ext/kgio/extconf.rb
+++ b/ext/kgio/extconf.rb
@@ -7,6 +7,12 @@ unless have_macro('CLOCK_MONOTONIC', 'time.h')
 end
 have_type('clockid_t', 'time.h')
 have_library('rt', 'clock_gettime', 'time.h')
+
+# taken from ext/socket/extconf.rb in ruby/trunk:
+# OpenSolaris:
+have_library("nsl", "t_open")
+have_library("socket", "socket")
+
 have_func("poll", "poll.h")
 have_func("getaddrinfo", %w(sys/types.h sys/socket.h netdb.h)) or
   abort "getaddrinfo required"
-- 
Eric Wong

Re: [kgio] [PATCH] extconf: -lnsl and -lsocket checks for OpenSolaris

From:
Jeremy Evans
Date:
2011-06-13 @ 23:38
On 06/13 02:39, Eric Wong wrote:
> I've just pushed this out to kgio.git
> 
> Can *BSD/OpenSolaris users make sure this doesn't break anything for
> them?  Thanks!

No regressions on OpenBSD 4.9, as those libraries don't exist on
OpenBSD:

have_library: checking for t_open() in -lnsl... -------------------- no
/usr/bin/ld: cannot find -lnsl

have_library: checking for socket() in -lsocket... ----------------- no
/usr/bin/ld: cannot find -lsocket

Jeremy

Re: [kgio] [PATCH] extconf: -lnsl and -lsocket checks for OpenSolaris

From:
Eric Wong
Date:
2011-06-14 @ 18:39
Jeremy Evans <code@jeremyevans.net> wrote:
> No regressions on OpenBSD 4.9

Thanks!  I'm a bit paranoid about somebody having -lnsl/-lsocket
that did completely different things, but I think I'll release
2.4.2 in a few.

-- 
Eric Wong