From patchwork Tue May 13 15:24:01 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andreas Schwab X-Patchwork-Id: 348395 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 C7E791400D5 for ; Wed, 14 May 2014 01:24:23 +1000 (EST) DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:from:to:subject:date:message-id:mime-version :content-type; q=dns; s=default; b=l9KfwUOCpZDZhDamNXlAsxlJR+exM flAN2Q2QfU8rdm9xi07Q4m3HPwE1D8ZdrsU/TKDtplNsmahFcy/QyX3GE7kjzOdg FDg8Bxw35U0LBpp6QrQ9pjrnn42DDnYetv9su2whbdq3seQrmxfjZsv4e6vt/i2q U8UAZmYwDZQQSI= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:from:to:subject:date:message-id:mime-version :content-type; s=default; bh=HI/+4lKJLWLWkdB7SRVFrN9iGnQ=; b=eDj u6YkUog99zUhK4f8quScneaDFw2Ys21j9/UOgzfRxGwqTsOuAJpvJxzweXR3vyNy v6vEFtNOvmh5U8iAqal6sEiitzWvrLdEkut8i4pwNE7ltDgeyKC5max+k2go+kRs VFRrcqL8PVu5eFfQl4UFnpxbsQFbR5sESyjA42xw= Received: (qmail 11161 invoked by alias); 13 May 2014 15:24:06 -0000 Mailing-List: contact libc-alpha-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: libc-alpha-owner@sourceware.org Delivered-To: mailing list libc-alpha@sourceware.org Received: (qmail 11000 invoked by uid 89); 13 May 2014 15:24:05 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-3.2 required=5.0 tests=AWL, BAYES_00, RP_MATCHES_RCVD autolearn=ham version=3.3.2 X-HELO: mx2.suse.de From: Andreas Schwab To: libc-alpha@sourceware.org Subject: [PATCH] Fix macro warning on HAVE_PT_CHOWN X-Yow: Everybody gets free BORSCHT! Date: Tue, 13 May 2014 17:24:01 +0200 Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (gnu/linux) MIME-Version: 1.0 Tested with --enable-pt-chown=[yes|no]. Andreas. * config.h.in (HAVE_PT_CHOWN): Define as 0. * sysdeps/unix/grantpt.c (grantpt): Check HAVE_PT_CHOWN for value, not definedness. --- config.h.in | 2 +- sysdeps/unix/grantpt.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/config.h.in b/config.h.in index b6e3623..a9ff1e3 100644 --- a/config.h.in +++ b/config.h.in @@ -251,7 +251,7 @@ #undef HAVE_ARM_PCS_VFP /* The pt_chown binary is being built and used by grantpt. */ -#undef HAVE_PT_CHOWN +#define HAVE_PT_CHOWN 0 /* ports/sysdeps/mips/configure.in */ /* Define if using the IEEE 754-2008 NaN encoding on the MIPS target. */ diff --git a/sysdeps/unix/grantpt.c b/sysdeps/unix/grantpt.c index 410dc50..2cb277c 100644 --- a/sysdeps/unix/grantpt.c +++ b/sysdeps/unix/grantpt.c @@ -176,7 +176,7 @@ grantpt (int fd) /* We have to use the helper program if it is available. */ helper:; -#ifdef HAVE_PT_CHOWN +#if HAVE_PT_CHOWN pid_t pid = __fork (); if (pid == -1) goto cleanup;