From patchwork Wed Mar 8 09:20:41 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Eric Botcazou X-Patchwork-Id: 736513 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3vdSgX6CS0z9s8V for ; Wed, 8 Mar 2017 20:20:55 +1100 (AEDT) Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=gcc.gnu.org header.i=@gcc.gnu.org header.b="sNNA+XhH"; dkim-atps=neutral DomainKey-Signature: a=rsa-sha1; c=nofws; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender:from :to:subject:date:message-id:mime-version:content-type :content-transfer-encoding; q=dns; s=default; b=oDPD/EUw+q2WC5lM pFWw80O51FoXsnmGIYHOovCaNwWYjtQyhwCDlbyYbR01Pm7a2XCndWDolcNmYBTe Y8ibzijp811n/iQWGPkyfSWwVIRpCQra46y/pW68cnfrT5RT46wz5kPHt181bkOA iq1z+anf06mPDQ5WzuUiPt2t78A= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender:from :to:subject:date:message-id:mime-version:content-type :content-transfer-encoding; s=default; bh=sNTN0kK23ZSDp30ti8ESgS BtmHo=; b=sNNA+XhHSq36veKb1+RymRvRamny6ZudF19mHO2UihqRxB7jT412A8 hYKgo9A4Bxr8zY+aAqx6rIAufnE6JIXGSoflCvfISxkv+l4/XQQo4ck35NOU4Rjb lSi8jmPmOX6jmZIUxgA50z6/2qiaQqYPAoPXHUoO8mecYQxkx4YLs= Received: (qmail 74600 invoked by alias); 8 Mar 2017 09:20:45 -0000 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Delivered-To: mailing list gcc-patches@gcc.gnu.org Received: (qmail 74579 invoked by uid 89); 8 Mar 2017 09:20:44 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-10.8 required=5.0 tests=AWL, BAYES_00, GIT_PATCH_2, GIT_PATCH_3, RCVD_IN_DNSWL_NONE, SPF_PASS autolearn=ham version=3.3.2 spammy= X-HELO: smtp.eu.adacore.com Received: from mel.act-europe.fr (HELO smtp.eu.adacore.com) (194.98.77.210) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Wed, 08 Mar 2017 09:20:43 +0000 Received: from localhost (localhost [127.0.0.1]) by filtered-smtp.eu.adacore.com (Postfix) with ESMTP id 7549B81582 for ; Wed, 8 Mar 2017 10:20:42 +0100 (CET) Received: from smtp.eu.adacore.com ([127.0.0.1]) by localhost (smtp.eu.adacore.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 00B9FNaskTj8 for ; Wed, 8 Mar 2017 10:20:42 +0100 (CET) Received: from polaris.localnet (bon31-6-88-161-99-133.fbx.proxad.net [88.161.99.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.eu.adacore.com (Postfix) with ESMTPSA id 53F8E81577 for ; Wed, 8 Mar 2017 10:20:42 +0100 (CET) From: Eric Botcazou To: gcc-patches@gcc.gnu.org Subject: [Ada] Fix PR ada/79903 Date: Wed, 08 Mar 2017 10:20:41 +0100 Message-ID: <1599762.7EjBRvm2vI@polaris> User-Agent: KMail/4.14.10 (Linux/3.16.7-53-desktop; KDE/4.14.9; x86_64; ; ) MIME-Version: 1.0 This (apparently) fixes the build of the runtime on RTEMS. Tested on x86-64/Linux, applied on mainline and 6 branch. 2017-03-08 Thanassis Tsiodras PR ada/79903 * socket.c (__gnat_gethostbyaddr): Add missing test for __rtems__. Index: socket.c =================================================================== --- socket.c (revision 245628) +++ socket.c (working copy) @@ -202,7 +202,7 @@ __gnat_gethostbyaddr (const char *addr, struct hostent *rh; int ri; -#if defined(__linux__) || defined(__GLIBC__) +#if defined(__linux__) || defined(__GLIBC__) || defined(__rtems__) (void) gethostbyaddr_r (addr, len, type, ret, buf, buflen, &rh, h_errnop); #else rh = gethostbyaddr_r (addr, len, type, ret, buf, buflen, h_errnop);