From patchwork Thu Jun 27 15:40:29 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vincent Chen X-Patchwork-Id: 1123477 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=sourceware.org (client-ip=209.132.180.131; helo=sourceware.org; envelope-from=libc-alpha-return-103247-incoming=patchwork.ozlabs.org@sourceware.org; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=andestech.com Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; secure) header.d=sourceware.org header.i=@sourceware.org header.b="pjPnt9cI"; dkim-atps=neutral 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 45ZPHm1brqz9s3l for ; Fri, 28 Jun 2019 01:40:52 +1000 (AEST) 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:cc:subject:date:message-id :mime-version:content-type; q=dns; s=default; b=vooOTdWKw5eCJRxw 0KEDY4VkHs8lEDIx2GTmlHAbE9/mCgRcitekAKA8FYDm30MFz+UJ8x48hgoCxVAF ynKjwRY//iV/lGD82lktEPkSQ2vzFYi31iCBAnyG4pLwxv+X3OvUm5bNq9tPbCg6 QoWOlMi/7gJt+o4KtbBWu1+4hmw= 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:cc:subject:date:message-id :mime-version:content-type; s=default; bh=Smgrp3er8wua9xf0ZJ6YjV AfBP8=; b=pjPnt9cICCz//i4xfIHoWSPcnOSfuMsONdy9EsK2/h05Dw9rlZiYai oXLkgpuNVOIugslQgzsoorsWsHQTyBNHBPsNF5Rqsfj4dOBuj5b+E0M1GNM7EexS 3J9WIBoLQbbRPUTXyigcfVk/nI/6Gkh+3uaBpFnbsQmmfVQ4daWFo= Received: (qmail 50251 invoked by alias); 27 Jun 2019 15:40:46 -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 50243 invoked by uid 89); 27 Jun 2019 15:40:46 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-22.7 required=5.0 tests=AWL, BAYES_00, GIT_PATCH_0, GIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3, KAM_SHORT, RDNS_DYNAMIC, SPF_PASS, TVD_RCVD_IP autolearn=ham version=3.3.1 spammy= X-HELO: ATCSQR.andestech.com From: Vincent Chen To: CC: , Vincent Chen Subject: [PATCH] io: include typesizes.h before using macro __OFF_T_MATCHES_OFF64_T Date: Thu, 27 Jun 2019 23:40:29 +0800 Message-ID: <1561650029-32363-1-git-send-email-vincentc@andestech.com> MIME-Version: 1.0 X-DNSRBL: X-MAIL: ATCSQR.andestech.com x5RFWks1084126 The macro __OFF_T_MATCHES_OFF64_T is defined in typesizes.h if the data type of off_t is the same as off64_t. Hence the condition "#ifndef __OFF_T_MATCHES_OFF64_T" will be valid when the header file typesizes.h is included. Reviewed-by: Adhemerval Zanella --- ChangeLog | 5 +++++ io/lockf.c | 4 ++-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index c10f372..57e87cc 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2019-06-27 Vincentc Chen + + * io/lockf.c: include typesizes.h before using macro + __OFF_T_MATCHES_OFF64_T. + 2019-06-26 H.J. Lu * sysdeps/i386/dl-lookupcfg.h: Moved to ... diff --git a/io/lockf.c b/io/lockf.c index d40aa88..a8a8530 100644 --- a/io/lockf.c +++ b/io/lockf.c @@ -15,12 +15,12 @@ License along with the GNU C Library; if not, see . */ -#ifndef __OFF_T_MATCHES_OFF64_T - #include #include #include +#ifndef __OFF_T_MATCHES_OFF64_T + /* lockf is a simplified interface to fcntl's locking facilities. */ int lockf (int fd, int cmd, off_t len)