From patchwork Sat Oct 26 19:48:11 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Gerald Pfeifer X-Patchwork-Id: 286303 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 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id 4F3852C013B for ; Sun, 27 Oct 2013 06:48:22 +1100 (EST) DomainKey-Signature: a=rsa-sha1; c=nofws; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender:date :from:to:subject:message-id:mime-version:content-type; q=dns; s= default; b=XTHZHeb/D6PZi8kaq8ccVhlVUnCWe18mVy9wkh2abxkFnjNB92z1c 9ftpxfpWNvumoxbA4AsvrtQy7/QXmCvFrq0sUpJYL2ZWXZGjXRiWyh0qUjQbq5Cr HWkY/21/LnFYWK+YtKiSbzLc3NaNL7fmqR4k7CTMRHlWEB+XN4wfqg= 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:date :from:to:subject:message-id:mime-version:content-type; s= default; bh=WCS427OBocp0omvbeFR7+YdcBZU=; b=MInqPcyhEaXR2VD04+lZ ugdoLkvYzrQuIAtXEnxxwog5gUi9eh6bTOrGvHT2Be7MrZOoW7Pf2u9zHOcOy+KH yZ5mvIDLnVpTySY+VcCNerul8LTcpQD42FxsyxdTLrVi+49fA7gZG4nAx2FUlOQW /lbYSy1MtGZLjEwohSHv+H4= Received: (qmail 4628 invoked by alias); 26 Oct 2013 19:48:16 -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 4615 invoked by uid 89); 26 Oct 2013 19:48:15 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.9 required=5.0 tests=AWL, BAYES_00, SPF_PASS autolearn=ham version=3.3.2 X-HELO: ainaz.pair.com Received: from ainaz.pair.com (HELO ainaz.pair.com) (209.68.2.66) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Sat, 26 Oct 2013 19:48:14 +0000 Received: from trevally.dhcp.nue.suse.com (nat.nue.novell.com [195.135.221.2]) by ainaz.pair.com (Postfix) with ESMTPSA id 242F13F463 for ; Sat, 26 Oct 2013 15:48:12 -0400 (EDT) Date: Sat, 26 Oct 2013 21:48:11 +0200 (CEST) From: Gerald Pfeifer To: gcc-patches@gcc.gnu.org Subject: [libiberty] Fix testsuite/test-demangle.c Message-ID: MIME-Version: 1.0 X-IsSubscribed: yes This is similar to my fix for testsuite/test-expandargv.c last week. I'm still not sure why this does not trigger on GNU/Linux distributions, or earlier version of FreeBSD. On FreeBSD 10 one does need to #include to get getpagesize which is used by the test. With this, the test now compiles on my i386-unknown-freebsd10.0 tester; without it, it doesn't. Okay? Gerald 2013-10-26 Gerald Pfeifer * testsuite/test-demangle.c: Include unistd.h. Index: libiberty/testsuite/test-demangle.c =================================================================== --- libiberty/testsuite/test-demangle.c (revision 204095) +++ libiberty/testsuite/test-demangle.c (working copy) @@ -32,6 +32,9 @@ #if HAVE_STDLIB_H # include #endif +#ifdef HAVE_UNISTD_H +#include +#endif struct line {