From patchwork Thu Feb 21 07:39:01 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Xiao Yang X-Patchwork-Id: 10823247 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 6EC831390 for ; Thu, 21 Feb 2019 07:39:17 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 54CD02E946 for ; Thu, 21 Feb 2019 07:39:17 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 492532E964; Thu, 21 Feb 2019 07:39:17 +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 41C112E96C for ; Thu, 21 Feb 2019 07:39:12 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1725831AbfBUHjM (ORCPT ); Thu, 21 Feb 2019 02:39:12 -0500 Received: from mail.cn.fujitsu.com ([183.91.158.132]:2733 "EHLO heian.cn.fujitsu.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1725648AbfBUHjM (ORCPT ); Thu, 21 Feb 2019 02:39:12 -0500 X-IronPort-AV: E=Sophos;i="5.58,394,1544457600"; d="scan'208";a="54864837" Received: from unknown (HELO cn.fujitsu.com) ([10.167.33.5]) by heian.cn.fujitsu.com with ESMTP; 21 Feb 2019 15:39:08 +0800 Received: from G08CNEXCHPEKD02.g08.fujitsu.local (unknown [10.167.33.83]) by cn.fujitsu.com (Postfix) with ESMTP id 71B8A4BAD9DB for ; Thu, 21 Feb 2019 15:39:01 +0800 (CST) Received: from localhost.localdomain.localdomain (10.167.215.39) by G08CNEXCHPEKD02.g08.fujitsu.local (10.167.33.89) with Microsoft SMTP Server (TLS) id 14.3.408.0; Thu, 21 Feb 2019 15:39:05 +0800 From: Xiao Yang To: CC: Xiao Yang Subject: [PATCH] src/Makefile: Link clock_gettime(2) with -lrt Date: Thu, 21 Feb 2019 15:39:01 +0800 Message-ID: <1550734741-4375-1-git-send-email-yangx.jy@cn.fujitsu.com> X-Mailer: git-send-email 1.8.3.1 MIME-Version: 1.0 X-Originating-IP: [10.167.215.39] X-yoursite-MailScanner-ID: 71B8A4BAD9DB.AC60E X-yoursite-MailScanner: Found to be clean X-yoursite-MailScanner-From: yangx.jy@cn.fujitsu.com Sender: fstests-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: fstests@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Compiling t_open_tmpfiles.c failed on older glibc(before glibc v2.17) because clock_gettime(2) was not linked with -lrt, as below: -------------------------------------------------------------------- /home/yangxiao/xfstests/src/t_open_tmpfiles.c:36: undefined reference to `clock_gettime' -------------------------------------------------------------------- According to clock_gettime(2) manpage, we should link clock_gettime(2) with -lrt on older glibc. Signed-off-by: Xiao Yang Reviewed-by: Darrick J. Wong --- src/Makefile | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/src/Makefile b/src/Makefile index dbba7c7..4057d7b 100644 --- a/src/Makefile +++ b/src/Makefile @@ -31,7 +31,7 @@ LINUX_TARGETS = xfsctl bstat t_mtab getdevicesize preallo_rw_pattern_reader \ SUBDIRS = log-writes perf -LLDLIBS = $(LIBATTR) $(LIBHANDLE) $(LIBACL) -lpthread +LLDLIBS = $(LIBATTR) $(LIBHANDLE) $(LIBACL) -lpthread -lrt ifeq ($(HAVE_XLOG_ASSIGN_LSN), true) LINUX_TARGETS += loggen