From patchwork Fri Dec 11 13:07:14 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jonathan Perkin X-Patchwork-Id: 7829411 X-Patchwork-Delegate: herbert@gondor.apana.org.au Return-Path: X-Original-To: patchwork-dash@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id C429D9F1C2 for ; Fri, 11 Dec 2015 13:07:30 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id A376720570 for ; Fri, 11 Dec 2015 13:07:26 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 258E12057E for ; Fri, 11 Dec 2015 13:07:24 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751489AbbLKNHX (ORCPT ); Fri, 11 Dec 2015 08:07:23 -0500 Received: from mail-wm0-f50.google.com ([74.125.82.50]:34069 "EHLO mail-wm0-f50.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750960AbbLKNHW (ORCPT ); Fri, 11 Dec 2015 08:07:22 -0500 Received: by mail-wm0-f50.google.com with SMTP id c17so10955389wmd.1 for ; Fri, 11 Dec 2015 05:07:22 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=joyent.com; s=google; h=date:from:to:subject:message-id:mime-version:content-type :content-disposition:user-agent; bh=PbhWAqw0WOGi0/HW3I3UkYJvijQt+wSyPnRIiJA7gAw=; b=RmD+/CBe2zicMHuIryoeTzXSFsbJBGHf/PNXgxu+KKKEo0uwJt7gvUL7RSCseXt6Xa 9qGZU28yHfyF71WweecUTXEenQu+kCBTLRU6TRohROLLb0ABbGhY2Bv4R55VWncSk7ji txVYO/f/9Dqomz1psO/lmXQnXKu1rZu0fiQMw= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:date:from:to:subject:message-id:mime-version :content-type:content-disposition:user-agent; bh=PbhWAqw0WOGi0/HW3I3UkYJvijQt+wSyPnRIiJA7gAw=; b=mfFtEvhEaUePbFaElIWL9B0+9OxHYwTX7QwnLAJlfjFvt0tMeBDBi8ngtBDBBBzj7w qt7zGHWCP4asnXHclBA8zwu2zYh8BCABe4njUS0+cFKQgvMbucoVhUw5DOEIUIaX3X2e VpshfrR7L8LFQPZBP+oWAbchlLOPQXw0235zW/IbcTpkbuWc6jWM0zH4LAqlxs2iRPX9 fswkfy7F2xeqek5k7+tn+iS2VtAtRBv3i8dORaVg4Xqo9E8SK29nI081AUTNhOpyZk1Q qlqhS/QKpzE0N826WXyTrpNtAPcErs7nSpnPc3+2uFBa/V0OXRu+Wx6aYcWbLvqRuW/M 7Qpg== X-Gm-Message-State: ALoCoQl0RjevFASaw3FiJ7KdE+XgyYSSiuTVA5WPXc7eWqNJwyxZxV9HamUn8m6nrWBEzNIPDCD46sz3TI2TiaNugrJYWz2dKQ== X-Received: by 10.28.64.131 with SMTP id n125mr5831029wma.103.1449839241561; Fri, 11 Dec 2015 05:07:21 -0800 (PST) Received: from joyent.com (host86-144-234-20.range86-144.btcentralplus.com. [86.144.234.20]) by smtp.gmail.com with ESMTPSA id t64sm3306298wmf.23.2015.12.11.05.07.18 for (version=TLSv1/SSLv3 cipher=OTHER); Fri, 11 Dec 2015 05:07:20 -0800 (PST) Date: Fri, 11 Dec 2015 13:07:14 +0000 From: Jonathan Perkin To: dash@vger.kernel.org Subject: [PATCH] [SHELL] Fix 64-bit Solaris build Message-ID: <20151211130714.GD54973@joyent.com> MIME-Version: 1.0 Content-Disposition: inline User-Agent: Mutt/1.5.24 (2015-08-30) Sender: dash-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: dash@vger.kernel.org X-Spam-Status: No, score=-6.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI,T_DKIM_INVALID,T_RP_MATCHES_RCVD,UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP In a 64-bit Solaris environment there is no stat64() function, only stat(). This conflicts with the stat64 #define used to support dietlibc/klibc when stat64() is not found and results in: ./../config.h:194:16: error: redefinition of 'struct stat' #define stat64 stat ^ In file included from cd.c:36:0: /usr/include/sys/stat.h:217:8: note: originally defined here struct stat { ^ Instead, add a AC_CHECK_DECL test for stat64, and only perform the AC_CHECK_FUNC test if it isn't already defined. --- configure.ac | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/configure.ac b/configure.ac index 8ae0dc6..f4c9b87 100644 --- a/configure.ac +++ b/configure.ac @@ -139,10 +139,12 @@ if test "$ac_cv_func_signal" != yes; then fi dnl Check for stat64 (dietlibc/klibc). -AC_CHECK_FUNC(stat64,, [ - AC_DEFINE(fstat64, fstat, [64-bit operations are the same as 32-bit]) - AC_DEFINE(lstat64, lstat, [64-bit operations are the same as 32-bit]) - AC_DEFINE(stat64, stat, [64-bit operations are the same as 32-bit]) +AC_CHECK_DECL(stat64,,[ + AC_CHECK_FUNC(stat64,, [ + AC_DEFINE(fstat64, fstat, [64-bit operations are the same as 32-bit]) + AC_DEFINE(lstat64, lstat, [64-bit operations are the same as 32-bit]) + AC_DEFINE(stat64, stat, [64-bit operations are the same as 32-bit]) + ]) ]) AC_CHECK_FUNC(open64,, [