Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 23 Aug 2003 23:46:27 -0600
From:      Greg Lewis <glewis@misty.eyesbeyond.com>
To:        Yamada Ken Takeshi <ken@tydfam.jp>
Cc:        java@freebsd.org
Subject:   Re: jdk14 on -current
Message-ID:  <20030824054627.GB50911@misty.eyesbeyond.com>
In-Reply-To: <20030824.135139.576024018.ken@tydfam.jp>
References:  <Pine.GSO.4.10.10308222230430.13565-100000@pcnet5.pcnet.com> <20030823143947.GA91554@misty.eyesbeyond.com> <20030824.135139.576024018.ken@tydfam.jp>

next in thread | previous in thread | raw e-mail | index | archive | help

--A6N2fC+uXW/VQSAv
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline

On Sun, Aug 24, 2003 at 01:51:39PM +0900, Yamada Ken Takeshi wrote:
>   One more!
>   I needed the below, too.
> 
> j2se/src/solaris/native/java/net/Inet6AddressImpl.c
>   :            :            :            :
> #ifndef __GLIBC__
> /* gethostname() is in libc.so but I can't find a header file for it */
> /***** /usr/include/unistd.h : 407 *******/
> extern int gethostname(char *buf, size_t buf_len);
>                                   ^^^^^^
> #endif

This is also fixed in CVS.  However that fix requires a bit more work.  Try
the attached patch for a quick fix.

-- 
Greg Lewis                          Email   : glewis@eyesbeyond.com
Eyes Beyond                         Web     : http://www.eyesbeyond.com
Information Technology              FreeBSD : glewis@FreeBSD.org


--A6N2fC+uXW/VQSAv
Content-Type: text/plain; charset=us-ascii
Content-Disposition: attachment; filename="Inet6AddressImpl.c.diff"

--- j2se/src/solaris/native/java/net/Inet6AddressImpl.c.orig	Sat Aug 23 23:44:36 2003
+++ j2se/src/solaris/native/java/net/Inet6AddressImpl.c	Sat Aug 23 23:45:08 2003
@@ -14,6 +14,7 @@
 #include <strings.h>
 #include <stdlib.h>
 #include <ctype.h>
+#include <unistd.h>
 
 #include "jvm.h"
 #include "jni_util.h"
@@ -26,7 +27,7 @@
 #define NI_MAXHOST 1025
 #endif 
 
-#ifndef __GLIBC__
+#if !defined(__GLIBC__) && !defined(__FreeBSD__)
 /* gethostname() is in libc.so but I can't find a header file for it */
 extern int gethostname(char *buf, int buf_len);
 #endif

--A6N2fC+uXW/VQSAv--


Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20030824054627.GB50911>