From patchwork Tue Aug 16 07:30:56 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Florian Weimer X-Patchwork-Id: 1666703 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=sourceware.org (client-ip=8.43.85.97; helo=sourceware.org; envelope-from=libc-alpha-bounces+incoming=patchwork.ozlabs.org@sourceware.org; receiver=) Authentication-Results: legolas.ozlabs.org; dkim=pass (1024-bit key; secure) header.d=sourceware.org header.i=@sourceware.org header.a=rsa-sha256 header.s=default header.b=OVTtlzN5; dkim-atps=neutral Received: from sourceware.org (ip-8-43-85-97.sourceware.org [8.43.85.97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4M6NC327b0z1yfd for ; Tue, 16 Aug 2022 17:32:15 +1000 (AEST) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 9D8BB38582BA for ; Tue, 16 Aug 2022 07:32:09 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 9D8BB38582BA DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1660635129; bh=cpsXboZ+O0WlXFW3O52UowQjbNz+Jke7mDmST0PoSUg=; h=To:Subject:Date:List-Id:List-Unsubscribe:List-Archive:List-Post: List-Help:List-Subscribe:From:Reply-To:From; b=OVTtlzN53nJv7iR0CvU5IKWfnG3T38lQVAnQj2XfuhNbZduwMllZ/yHQvqQ6e7P+M RlXiqJR+oK52qeEickmzmahgdshqKOii5Ixk5+IrJIuumrJxRNZiX5oHbfBTUnAclL X2fVzOrzvjDoTDbwHIJsQUEu04eK+ER7I3ziIq3s= X-Original-To: libc-alpha@sourceware.org Delivered-To: libc-alpha@sourceware.org Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by sourceware.org (Postfix) with ESMTPS id 372BC3858412 for ; Tue, 16 Aug 2022 07:31:02 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 372BC3858412 Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-478-CUWbgTVdMiWUXZu1kYUyiQ-1; Tue, 16 Aug 2022 03:30:59 -0400 X-MC-Unique: CUWbgTVdMiWUXZu1kYUyiQ-1 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.rdu2.redhat.com [10.11.54.4]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 47591185A79C; Tue, 16 Aug 2022 07:30:59 +0000 (UTC) Received: from oldenburg.str.redhat.com (unknown [10.39.192.98]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 71BAB2026D4C; Tue, 16 Aug 2022 07:30:58 +0000 (UTC) To: libc-alpha@sourceware.org Subject: [PATCH] Linux: Fix enum fsconfig_command detection in Date: Tue, 16 Aug 2022 09:30:56 +0200 Message-ID: <87a684ejbj.fsf@oldenburg.str.redhat.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux) MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.78 on 10.11.54.4 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com X-Spam-Status: No, score=-10.7 required=5.0 tests=BAYES_00, DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_NONE, TXREP, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-BeenThere: libc-alpha@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Libc-alpha mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-Patchwork-Original-From: Florian Weimer via Libc-alpha From: Florian Weimer Reply-To: Florian Weimer Errors-To: libc-alpha-bounces+incoming=patchwork.ozlabs.org@sourceware.org Sender: "Libc-alpha" The #ifdef FSOPEN_CLOEXEC check did not work because the macro was defined prior to its use. This caused misc/tst-mount to fail to build with older kernel headers. Fixes commit 774058d72942249f71d74e7f2b639f77184160a6 ("linux: Fix sys/mount.h usage with kernel headers"). Tesed on power64-linux-gnu. --- sysdeps/unix/sysv/linux/sys/mount.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/sysdeps/unix/sysv/linux/sys/mount.h b/sysdeps/unix/sysv/linux/sys/mount.h index 2e3fd6a7fe..19841d0738 100644 --- a/sysdeps/unix/sysv/linux/sys/mount.h +++ b/sysdeps/unix/sysv/linux/sys/mount.h @@ -188,9 +188,6 @@ enum }; -/* fsopen flags. */ -#define FSOPEN_CLOEXEC 0x00000001 - /* fsmount flags. */ #define FSMOUNT_CLOEXEC 0x00000001 @@ -261,6 +258,9 @@ enum fsconfig_command }; #endif +/* fsopen flags. */ +#define FSOPEN_CLOEXEC 0x00000001 + /* open_tree flags. */ #define OPEN_TREE_CLONE 1 /* Clone the target tree and attach the clone */ #define OPEN_TREE_CLOEXEC O_CLOEXEC /* Close the file on execve() */