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: 33454 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)