From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 14879 invoked by alias); 17 Aug 2016 17:40:04 -0000 Mailing-List: contact libc-alpha-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: libc-alpha-owner@sourceware.org Received: (qmail 14855 invoked by uid 89); 17 Aug 2016 17:40:03 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.6 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_LOW autolearn=ham version=3.3.2 spammy=U*jlayton, sk:jlayton, jlayton@redhat.com, jlaytonredhatcom X-HELO: mail-qk0-f173.google.com X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:message-id:subject:from:to:cc:date:in-reply-to :references:mime-version:content-transfer-encoding; bh=VFBTHatbOhyvAsWhURC6W6Q/5J+CiVaQaaCIJJWLooQ=; b=QLhKto2yWlw/6/jrFIKz9KIz/MZX+8hW2f6lIjD0oiXvX6jaLOKxLBmvltzSu6Jzze OPeq4RC2Q2S0d110NYr2jGWzeAXKIqhBq1PiT2h6TdNIReB3NZH5HBnaCUAuyCZuDBgS td4Vh/VKSyLGLqBlhRLzO5S+aXLuLAb3HrI5vA6JQF3kvuMl1k86MeK5JjobV6lul/ED uVDfPNJF0t2Cwe+oA+ooMT+Fq8h6Xn4OsOINzZgLEDq0SnQ1u9QHyoBXzBgimGKjl+Rq /HTFfMU+95HzN6rKtWiTNf3vq7r8QA9ynTMLahJdRSju08GmJfDcn9vneQ8/TLWm2TKh 6YXw== X-Gm-Message-State: AEkoouska8ZapQ4wMaFHkGj9mrMzTVsq9iTXAMZxlEoFc4MewdJxIJJCoE1RfTiXqRROyBCB X-Received: by 10.55.116.134 with SMTP id p128mr44618817qkc.165.1471455599395; Wed, 17 Aug 2016 10:39:59 -0700 (PDT) Message-ID: <1471455596.3196.36.camel@redhat.com> Subject: Re: [glibc PATCH] fcntl: put F_OFD_* constants under #ifdef __USE_FILE_OFFSET64 From: Jeff Layton To: Florian Weimer , libc-alpha@sourceware.org Cc: linux-fsdevel@vger.kernel.org, Michael Kerrisk , Carlos O'Donell , Yuriy Kolerov Date: Wed, 17 Aug 2016 17:40:00 -0000 In-Reply-To: <024779d0-2800-8e43-b65c-180eca70cc8b@redhat.com> References: <1471445251-2450-1-git-send-email-jlayton@redhat.com> <024779d0-2800-8e43-b65c-180eca70cc8b@redhat.com> Content-Type: text/plain; charset="UTF-8" Mime-Version: 1.0 Content-Transfer-Encoding: 8bit X-SW-Source: 2016-08/txt/msg00524.txt.bz2 On Wed, 2016-08-17 at 19:34 +0200, Florian Weimer wrote: > 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? > > No. The kernel will decide which type of struct it is based on whether userland passes in F_SETLK or F_SETLK64. Since the older flock struct is considered a legacy interface, I didn't plumb that in when I did these patches originally. With my 20/20 hindsight, I probably should have just done that, but it's a little late now... -- Jeff Layton