From patchwork Wed Nov 28 21:42:12 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dan Williams X-Patchwork-Id: 10703431 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 7535617D5 for ; Wed, 28 Nov 2018 21:54:58 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 495882DB6D for ; Wed, 28 Nov 2018 21:54:46 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 3B2272DAA8; Wed, 28 Nov 2018 21:54:46 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.9 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.1 Received: from ml01.01.org (ml01.01.org [198.145.21.10]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 6D7062DAA8 for ; Wed, 28 Nov 2018 21:54:42 +0000 (UTC) Received: from [127.0.0.1] (localhost [IPv6:::1]) by ml01.01.org (Postfix) with ESMTP id 29A8D21A00AE6; Wed, 28 Nov 2018 13:54:42 -0800 (PST) X-Original-To: linux-nvdimm@lists.01.org Delivered-To: linux-nvdimm@lists.01.org Received-SPF: Pass (sender SPF authorized) identity=mailfrom; client-ip=134.134.136.31; helo=mga06.intel.com; envelope-from=dan.j.williams@intel.com; receiver=linux-nvdimm@lists.01.org Received: from mga06.intel.com (mga06.intel.com [134.134.136.31]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id CD51E211944C4 for ; Wed, 28 Nov 2018 13:54:40 -0800 (PST) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga007.jf.intel.com ([10.7.209.58]) by orsmga104.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 28 Nov 2018 13:54:40 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.56,292,1539673200"; d="scan'208";a="93684916" Received: from dwillia2-desk3.jf.intel.com (HELO dwillia2-desk3.amr.corp.intel.com) ([10.54.39.16]) by orsmga007.jf.intel.com with ESMTP; 28 Nov 2018 13:54:40 -0800 Subject: [ndctl PATCH] ndctl, build: Define HAVE_UUID From: Dan Williams To: linux-nvdimm@lists.01.org Date: Wed, 28 Nov 2018 13:42:12 -0800 Message-ID: <154344133285.1069420.11463868512402749463.stgit@dwillia2-desk3.amr.corp.intel.com> User-Agent: StGit/0.18-2-gc94f MIME-Version: 1.0 X-BeenThere: linux-nvdimm@lists.01.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Linux-nvdimm developer list." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: linux-nvdimm-bounces@lists.01.org Sender: "Linux-nvdimm" X-Virus-Scanned: ClamAV using ClamSMTP Attempts to build ndctl in an epel-6 environment fail with the following messages: In file included from util/filter.c:24: ./daxctl/libdaxctl.h:22: error: redefinition of typedef 'uuid_t' ./ndctl/libndctl.h:26: note: previous declaration of 'uuid_t' was here Newer compilers discard the error since it sees the types are compatible, but the definition should be coming from uuid.h when built with libuuid. Arrange for an AC_DEFINE for the HAVE_UUID symbol when libuuid is detected by PKG_CHECK_MODULES. Signed-off-by: Dan Williams --- configure.ac | 3 ++- daxctl/libdaxctl.h | 2 +- ndctl/libndctl.h | 2 +- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/configure.ac b/configure.ac index bb6b03324ea8..de5b84cec670 100644 --- a/configure.ac +++ b/configure.ac @@ -112,7 +112,8 @@ AM_CONDITIONAL([ENABLE_POISON], PKG_CHECK_MODULES([KMOD], [libkmod]) PKG_CHECK_MODULES([UDEV], [libudev]) -PKG_CHECK_MODULES([UUID], [uuid]) +PKG_CHECK_MODULES([UUID], [uuid], + [AC_DEFINE([HAVE_UUID], [1], [Define to 1 if using libuuid])]) PKG_CHECK_MODULES([JSON], [json-c]) AC_ARG_WITH([bash], diff --git a/daxctl/libdaxctl.h b/daxctl/libdaxctl.h index 21bc376ce629..1d13ea291f6f 100644 --- a/daxctl/libdaxctl.h +++ b/daxctl/libdaxctl.h @@ -16,7 +16,7 @@ #include #include -#ifdef HAVE_LIBUUID +#ifdef HAVE_UUID #include #else typedef unsigned char uuid_t[16]; diff --git a/ndctl/libndctl.h b/ndctl/libndctl.h index 62cef9e82da3..c81cc032ebae 100644 --- a/ndctl/libndctl.h +++ b/ndctl/libndctl.h @@ -20,7 +20,7 @@ #include #include -#ifdef HAVE_LIBUUID +#ifdef HAVE_UUID #include #else typedef unsigned char uuid_t[16];