From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mx1.redhat.com ([209.132.183.28]:54308 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752353AbcHQRfp (ORCPT ); Wed, 17 Aug 2016 13:35:45 -0400 Subject: Re: [glibc PATCH] fcntl: put F_OFD_* constants under #ifdef __USE_FILE_OFFSET64 To: Jeff Layton , libc-alpha@sourceware.org References: <1471445251-2450-1-git-send-email-jlayton@redhat.com> Cc: linux-fsdevel@vger.kernel.org, Michael Kerrisk , "Carlos O'Donell" , Yuriy Kolerov From: Florian Weimer Message-ID: <024779d0-2800-8e43-b65c-180eca70cc8b@redhat.com> Date: Wed, 17 Aug 2016 19:34:35 +0200 MIME-Version: 1.0 In-Reply-To: <1471445251-2450-1-git-send-email-jlayton@redhat.com> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit Sender: linux-fsdevel-owner@vger.kernel.org List-ID: On 08/17/2016 04:47 PM, Jeff Layton wrote: > The Linux kernel expects a flock64 structure whenever you use OFD locks > with fcntl64. Unfortunately, you can currently build a 32-bit program > that passes in a struct flock when it calls fcntl64. > > Only define the F_OFD_* constants when __USE_FILE_OFFSET64 is also > defined, so that the build fails in this situation rather than > producing a broken binary. Doesn't this affect legacy POSIX-style locks as well, under very similar circumstances? Thanks, Florian