From patchwork Thu Nov 1 08:38:01 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Murphy Zhou X-Patchwork-Id: 10663697 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 8475413A4 for ; Thu, 1 Nov 2018 08:38:12 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 6BAF228789 for ; Thu, 1 Nov 2018 08:38:12 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 5F8652B8E4; Thu, 1 Nov 2018 08:38:12 +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=-7.9 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id F052028789 for ; Thu, 1 Nov 2018 08:38:11 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727879AbeKARkM (ORCPT ); Thu, 1 Nov 2018 13:40:12 -0400 Received: from mx1.redhat.com ([209.132.183.28]:46886 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727753AbeKARkM (ORCPT ); Thu, 1 Nov 2018 13:40:12 -0400 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 5494C83F3F; Thu, 1 Nov 2018 08:38:11 +0000 (UTC) Received: from localhost (dhcp-12-130.nay.redhat.com [10.66.12.130]) by smtp.corp.redhat.com (Postfix) with ESMTP id B69D85D6A6; Thu, 1 Nov 2018 08:38:10 +0000 (UTC) From: Xiong Murphy Zhou To: tridge@samba.org Cc: linux-cifs@vger.kernel.org, lsahlber@redhat.com, Xiong Zhou Subject: [PATCH] dbench: fix build error on RHEL8 Date: Thu, 1 Nov 2018 16:38:01 +0800 Message-Id: <20181101083801.22477-1-xzhou@redhat.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.15 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.27]); Thu, 01 Nov 2018 08:38:11 +0000 (UTC) Sender: linux-cifs-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-cifs@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Xiong Zhou Signed-off-by: Xiong Zhou --- Makefile.in | 14 +++++++------- configure.in | 2 +- libnfs.c | 1 + 3 files changed, 9 insertions(+), 8 deletions(-) diff --git a/Makefile.in b/Makefile.in index 00af80e..535a53a 100644 --- a/Makefile.in +++ b/Makefile.in @@ -11,7 +11,7 @@ datadir=@datadir@ docdir=@datadir@/doc/dbench XSLTPROC = /usr/bin/xsltproc INSTALLCMD=@INSTALL@ -LIBS=@LIBS@ -lpopt -lz @LIBSMBCLIENT@ @LIBISCSI@ +LIBS=@LIBS@ -lpopt -lz @LIBSMBCLIENT@ @LIBISCSI@ -ltirpc DESTDIR=/ CC=@CC@ CFLAGS=@CFLAGS@ -I. -DVERSION=\"$(VERSION)\" -DDATADIR=\"$(datadir)\" @@ -40,11 +40,11 @@ libnfs.a: $(LIBNFS_OBJ) nfsio.o: nfsio.c mount.h nfs.h @echo Compiling $@ - gcc -g -c nfsio.c -o $@ + gcc $(CFLAGS) -g -c nfsio.c -o $@ libnfs.o: libnfs.c libnfs.h mount.h nfs.h @echo Compiling $@ - gcc -g -c libnfs.c -o $@ + gcc $(CFLAGS) -g -c libnfs.c -o $@ mount.h: mount.x @echo Generating $@ @@ -56,7 +56,7 @@ nfs.h: nfs.x mount_xdr.o: mount_xdr.c mount.h @echo Compiling $@ - gcc -g -c mount_xdr.c -o $@ + gcc $(CFLAGS) -g -c mount_xdr.c -o $@ mount_xdr.c: mount.x @echo Generating $@ @@ -64,7 +64,7 @@ mount_xdr.c: mount.x mount_client.o: mount_client.c mount.h @echo Compiling $@ - gcc -g -c mount_client.c -o $@ + gcc $(CFLAGS) -g -c mount_client.c -o $@ mount_client.c: mount.x @echo Generating $@ @@ -72,7 +72,7 @@ mount_client.c: mount.x nfs_xdr.o: nfs_xdr.c nfs.h @echo Compiling $@ - gcc -g -c nfs_xdr.c -o $@ + gcc $(CFLAGS) -g -c nfs_xdr.c -o $@ nfs_xdr.c: nfs.x @echo Generating $@ @@ -80,7 +80,7 @@ nfs_xdr.c: nfs.x nfs_client.o: nfs_client.c nfs.h @echo Compiling $@ - gcc -g -c nfs_client.c -o $@ + gcc $(CFLAGS) -g -c nfs_client.c -o $@ nfs_client.c: nfs.x @echo Generating $@ diff --git a/configure.in b/configure.in index 14e0d32..54e1ff8 100644 --- a/configure.in +++ b/configure.in @@ -18,7 +18,7 @@ AC_DEFINE([_GNU_SOURCE], 1, # If GCC, turn on warnings. if test "x$GCC" = "xyes" then - CFLAGS="$CFLAGS -Wall -W" + CFLAGS="$CFLAGS -Wall -W $(pkg-config --cflags libtirpc)" else CFLAGS="$CFLAGS -O" fi diff --git a/libnfs.c b/libnfs.c index 1f60ef0..3b926c6 100644 --- a/libnfs.c +++ b/libnfs.c @@ -23,6 +23,7 @@ #include #include #include +#include #define discard_const(ptr) ((void *)((intptr_t)(ptr)))