From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 6615 invoked by alias); 6 Dec 2009 15:46:08 -0000 Received: (qmail 6607 invoked by uid 22791); 6 Dec 2009 15:46:07 -0000 X-SWARE-Spam-Status: No, hits=-2.5 required=5.0 tests=AWL,BAYES_00 X-Spam-Check-By: sourceware.org Received: from mel.act-europe.fr (HELO mel.act-europe.fr) (212.99.106.210) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Sun, 06 Dec 2009 15:46:04 +0000 Received: from localhost (localhost [127.0.0.1]) by filtered-smtp.eu.adacore.com (Postfix) with ESMTP id C2838290006 for ; Sun, 6 Dec 2009 16:46:01 +0100 (CET) Received: from mel.act-europe.fr ([127.0.0.1]) by localhost (smtp.eu.adacore.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id qusn2Tg1SDma for ; Sun, 6 Dec 2009 16:46:01 +0100 (CET) Received: from [192.168.1.2] (83-153-80-199.rev.libertysurf.net [83.153.80.199]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mel.act-europe.fr (Postfix) with ESMTP id 0FC14290008 for ; Sun, 6 Dec 2009 16:46:01 +0100 (CET) From: Eric Botcazou To: java-patches@gcc.gnu.org Subject: [patch] Fix configure glitch on Solaris Date: Sun, 06 Dec 2009 15:46:00 -0000 User-Agent: KMail/1.9.6 (enterprise 20070904.708012) MIME-Version: 1.0 Content-Type: Multipart/Mixed; boundary="Boundary-00=_AJ9GLmWVHVBxj+J" Message-Id: <200912061648.16539.ebotcazou@adacore.com> Mailing-List: contact java-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: java-patches-owner@gcc.gnu.org X-SW-Source: 2009-q4/txt/msg00027.txt.bz2 --Boundary-00=_AJ9GLmWVHVBxj+J Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Content-Disposition: inline Content-length: 505 Hi, natVMNetworkInterfacePosix.cc fails to compile under Solaris because 'struct ifconf' is not defined because net/if.h is not included, the root problem being that net/if.h requires sys/socket.h and the configure machinery doesn't provide it. Hence the attached patch, tested on SPARC/Solaris 9 and AMD64/Linux. OK for mainline? 2009-12-06 Eric Botcazou * configure.ac (net/if.h check): Include sys/socket.h if present. * configure: Regenerate. -- Eric Botcazou --Boundary-00=_AJ9GLmWVHVBxj+J Content-Type: text/x-diff; charset="us-ascii"; name="solaris_libjava.diff" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="solaris_libjava.diff" Content-length: 957 Index: configure.ac =================================================================== --- configure.ac (revision 155009) +++ configure.ac (working copy) @@ -1568,9 +1568,17 @@ TL_AC_GXX_INCLUDE_DIR # for now. If you change this, you also must update natFile.cc. AC_CHECK_HEADERS([unistd.h bstring.h sys/time.h sys/types.h fcntl.h \ sys/ioctl.h sys/filio.h sys/stat.h sys/select.h \ - sys/socket.h netinet/in.h arpa/inet.h netdb.h net/if.h \ + sys/socket.h netinet/in.h arpa/inet.h netdb.h \ pwd.h sys/config.h stdint.h langinfo.h locale.h \ dirent.h sys/rw_lock.h magic.h ifaddrs.h]) + +# sys/socket.h is a prerequisite for net/if.h on Solaris. +AC_CHECK_HEADERS(net/if.h, [], [], [ +#ifdef HAVE_SYS_SOCKET_H +#include +#endif +]) + AC_CHECK_HEADERS(inttypes.h, [ AC_DEFINE(HAVE_INTTYPES_H, 1, [Define if is available]) AC_DEFINE(JV_HAVE_INTTYPES_H, 1, [Define if is available]) --Boundary-00=_AJ9GLmWVHVBxj+J--