Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/2194187/?format=api
{ "id": 2194187, "url": "http://patchwork.ozlabs.org/api/patches/2194187/?format=api", "web_url": "http://patchwork.ozlabs.org/project/glibc/patch/xnms1ldtbb.fsf@greed.delorie.com/", "project": { "id": 41, "url": "http://patchwork.ozlabs.org/api/projects/41/?format=api", "name": "GNU C Library", "link_name": "glibc", "list_id": "libc-alpha.sourceware.org", "list_email": "libc-alpha@sourceware.org", "web_url": "", "scm_url": "", "webscm_url": "", "list_archive_url": "", "list_archive_url_format": "", "commit_url_format": "" }, "msgid": "<xnms1ldtbb.fsf@greed.delorie.com>", "list_archive_url": null, "date": "2026-02-07T05:19:20", "name": "[v1] include: isolate __O_CLOEXEC flag for sys/mount.h and fcntl.h", "commit_ref": null, "pull_url": null, "state": "new", "archived": false, "hash": "949e5b5509ba4f4ba488be31627d0ace63aacc44", "submitter": { "id": 4388, "url": "http://patchwork.ozlabs.org/api/people/4388/?format=api", "name": "DJ Delorie", "email": "dj@redhat.com" }, "delegate": null, "mbox": "http://patchwork.ozlabs.org/project/glibc/patch/xnms1ldtbb.fsf@greed.delorie.com/mbox/", "series": [ { "id": 491362, "url": "http://patchwork.ozlabs.org/api/series/491362/?format=api", "web_url": "http://patchwork.ozlabs.org/project/glibc/list/?series=491362", "date": "2026-02-07T05:19:20", "name": "[v1] include: isolate __O_CLOEXEC flag for sys/mount.h and fcntl.h", "version": 1, "mbox": "http://patchwork.ozlabs.org/series/491362/mbox/" } ], "comments": "http://patchwork.ozlabs.org/api/patches/2194187/comments/", "check": "pending", "checks": "http://patchwork.ozlabs.org/api/patches/2194187/checks/", "tags": {}, "related": [], "headers": { "Return-Path": "<libc-alpha-bounces~incoming=patchwork.ozlabs.org@sourceware.org>", "X-Original-To": [ "incoming@patchwork.ozlabs.org", "libc-alpha@sourceware.org" ], "Delivered-To": [ "patchwork-incoming@legolas.ozlabs.org", "libc-alpha@sourceware.org" ], "Authentication-Results": [ "legolas.ozlabs.org;\n\tdkim=pass (1024-bit key;\n unprotected) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256\n header.s=mimecast20190719 header.b=Ip5XztE7;\n\tdkim-atps=neutral", "legolas.ozlabs.org;\n spf=pass (sender SPF authorized) smtp.mailfrom=sourceware.org\n (client-ip=38.145.34.32; helo=vm01.sourceware.org;\n envelope-from=libc-alpha-bounces~incoming=patchwork.ozlabs.org@sourceware.org;\n receiver=patchwork.ozlabs.org)", "sourceware.org;\n\tdkim=pass (1024-bit key,\n unprotected) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256\n header.s=mimecast20190719 header.b=Ip5XztE7", "sourceware.org; dmarc=pass (p=quarantine dis=none)\n header.from=redhat.com", "sourceware.org; spf=pass smtp.mailfrom=redhat.com", "server2.sourceware.org;\n arc=none smtp.remote-ip=170.10.129.124" ], "Received": [ "from vm01.sourceware.org (vm01.sourceware.org [38.145.34.32])\n\t(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)\n\t key-exchange x25519 server-signature ECDSA (secp384r1) server-digest SHA384)\n\t(No client certificate requested)\n\tby legolas.ozlabs.org (Postfix) with ESMTPS id 4f7K5d3VJ9z1xvW\n\tfor <incoming@patchwork.ozlabs.org>; Sat, 07 Feb 2026 16:19:48 +1100 (AEDT)", "from vm01.sourceware.org (localhost [127.0.0.1])\n\tby sourceware.org (Postfix) with ESMTP id CD2324B9DB4B\n\tfor <incoming@patchwork.ozlabs.org>; Sat, 7 Feb 2026 05:19:46 +0000 (GMT)", "from us-smtp-delivery-124.mimecast.com\n (us-smtp-delivery-124.mimecast.com [170.10.129.124])\n by sourceware.org (Postfix) with ESMTP id 653164B9DB55\n for <libc-alpha@sourceware.org>; Sat, 7 Feb 2026 05:19:25 +0000 (GMT)", "from mx-prod-mc-01.mail-002.prod.us-west-2.aws.redhat.com\n (ec2-54-186-198-63.us-west-2.compute.amazonaws.com [54.186.198.63]) by\n relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3,\n cipher=TLS_AES_256_GCM_SHA384) id us-mta-531-kf5aitNkMOm2hD8P25UR7w-1; Sat,\n 07 Feb 2026 00:19:22 -0500", "from mx-prod-int-06.mail-002.prod.us-west-2.aws.redhat.com\n (mx-prod-int-06.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.93])\n (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)\n key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest\n SHA256)\n (No client certificate requested)\n by mx-prod-mc-01.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS\n id 0B9CA1956089\n for <libc-alpha@sourceware.org>; Sat, 7 Feb 2026 05:19:22 +0000 (UTC)", "from greed.delorie.com (unknown [10.22.88.155])\n by mx-prod-int-06.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with\n ESMTPS\n id BEBC51800464\n for <libc-alpha@sourceware.org>; Sat, 7 Feb 2026 05:19:21 +0000 (UTC)", "from greed.delorie.com.redhat.com (localhost [127.0.0.1])\n by greed.delorie.com (8.16.1/8.16.1) with ESMTP id 6175JKQP1377249\n for <libc-alpha@sourceware.org>; Sat, 7 Feb 2026 00:19:20 -0500" ], "DKIM-Filter": "OpenDKIM Filter v2.11.0 sourceware.org CD2324B9DB4B", "DMARC-Filter": "OpenDMARC Filter v1.4.2 sourceware.org 653164B9DB55", "ARC-Filter": "OpenARC Filter v1.0.0 sourceware.org 653164B9DB55", "ARC-Seal": "i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1770441565; cv=none;\n b=aHTD6r/7Rhp44Q58TwTgf9qCqTUBfhuKbT/9GtmufIeHuyH02gX1sb+8htDVRsUHATP7jZdoDbjkjMDJ5uO7jVfKqtG7gQ5D5dbT34Mac+AFA8x/cTsfSKgszsr69s7POrkcWxISxTX0CtvCfAiaQdSwJTrgWiSK07QZ1mdL+F4=", "ARC-Message-Signature": "i=1; a=rsa-sha256; d=sourceware.org; s=key;\n t=1770441565; c=relaxed/simple;\n bh=FPuc+YnIDo+I20Dv10c1jaHkPkV4dXut+/27Wo7uAKs=;\n h=DKIM-Signature:Date:Message-Id:From:To:Subject;\n b=NXrOZIniPbr7/OiO+FlJeXfmoXFtvBFpHdWnsuZLz41TaL8nMbWDUP37W1p6gyspvExlwEcJxrg9KrOYPfDq92j20ogoRkY+5LiT/2Ot1I5Md0I5CAibF+//O28TkMDgGtcVhed2eOVTp/kBfvguEN5/pq2X2bWhre/nMQTY2Rw=", "ARC-Authentication-Results": "i=1; server2.sourceware.org", "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com;\n s=mimecast20190719; t=1770441564;\n h=from:from:reply-to:subject:subject:date:date:message-id:message-id:\n to:to:cc:content-type:content-type;\n bh=LG88Bs3G4RBm/7Hfltp6DLBOrNsblItNoZ7X2aQb+so=;\n b=Ip5XztE7TNzMpeEssCOIcnqSpz3u8rY1uD1tByH11/7s2Fm70STZEoUc5iFBY1MT7vp4J9\n 7xxRe0JXUTGW1cB2dwnVcpFvb3fuxKumkew0LaRHKjh58G9o6/XsA0DEVL39gwcU+5v33M\n R6yz+ppM+LhGV2LYI6YmvBCj0KmsQ1A=", "X-MC-Unique": "kf5aitNkMOm2hD8P25UR7w-1", "X-Mimecast-MFC-AGG-ID": "kf5aitNkMOm2hD8P25UR7w_1770441562", "Date": "Sat, 07 Feb 2026 00:19:20 -0500", "Message-Id": "<xnms1ldtbb.fsf@greed.delorie.com>", "From": "DJ Delorie <dj@redhat.com>", "To": "libc-alpha@sourceware.org", "Subject": "[patch v1] include: isolate __O_CLOEXEC flag for sys/mount.h and\n fcntl.h", "X-Scanned-By": "MIMEDefang 3.4.1 on 10.30.177.93", "X-Mimecast-Spam-Score": "0", "X-Mimecast-MFC-PROC-ID": "xPbAZdzgP2hQdxboY_yXTkS84unmEmmXT4EAR1hcgQg_1770441562", "X-Mimecast-Originator": "redhat.com", "content-type": "text/plain; charset=\"US-ASCII\"; x-default=true", "X-BeenThere": "libc-alpha@sourceware.org", "X-Mailman-Version": "2.1.30", "Precedence": "list", "List-Id": "Libc-alpha mailing list <libc-alpha.sourceware.org>", "List-Unsubscribe": "<https://sourceware.org/mailman/options/libc-alpha>,\n <mailto:libc-alpha-request@sourceware.org?subject=unsubscribe>", "List-Archive": "<https://sourceware.org/pipermail/libc-alpha/>", "List-Post": "<mailto:libc-alpha@sourceware.org>", "List-Help": "<mailto:libc-alpha-request@sourceware.org?subject=help>", "List-Subscribe": "<https://sourceware.org/mailman/listinfo/libc-alpha>,\n <mailto:libc-alpha-request@sourceware.org?subject=subscribe>", "Errors-To": "libc-alpha-bounces~incoming=patchwork.ozlabs.org@sourceware.org" }, "content": "include: isolate __O_CLOEXEC flag for sys/mount.h and fcntl.h\n \n Including sys/mount.h should not implicitly include fcntl.h\n as that causes namespace pollution and conflicts with kernel\n headers. It only needs O_CLOEXEC for OPEN_TREE_CLOEXEC\n (although it shouldn't need that, but it's defined that way)\n so we provide that define (via a private version) separately.", "diff": "diff --git a/io/fcntl.c b/io/fcntl.c\nindex c13546e4fd..4fbc522624 100644\n--- a/io/fcntl.c\n+++ b/io/fcntl.c\n@@ -18,6 +18,10 @@\n #include <errno.h>\n #include <fcntl.h>\n \n+#ifndef __O_CLOEXEC\n+# error __O_CLOEXEC not defined by fcntl.h/cloexec.h\n+#endif\n+\n /* Perform file control operations on FD. */\n int\n __fcntl (int fd, int cmd, ...)\ndiff --git a/sysdeps/unix/sysv/linux/Makefile b/sysdeps/unix/sysv/linux/Makefile\nindex 955d316362..c6bd97abf1 100644\n--- a/sysdeps/unix/sysv/linux/Makefile\n+++ b/sysdeps/unix/sysv/linux/Makefile\n@@ -129,6 +129,7 @@ CFLAGS-test-errno-linux.c += $(no-fortify-source)\n \n sysdep_headers += \\\n bits/a.out.h \\\n+ bits/cloexec.h \\\n bits/epoll.h \\\n bits/eventfd.h \\\n bits/inotify.h \\\ndiff --git a/sysdeps/unix/sysv/linux/alpha/bits/cloexec.h b/sysdeps/unix/sysv/linux/alpha/bits/cloexec.h\nnew file mode 100644\nindex 0000000000..f381f28a53\n--- /dev/null\n+++ b/sysdeps/unix/sysv/linux/alpha/bits/cloexec.h\n@@ -0,0 +1 @@\n+#define __O_CLOEXEC 010000000\ndiff --git a/sysdeps/unix/sysv/linux/bits/cloexec.h b/sysdeps/unix/sysv/linux/bits/cloexec.h\nnew file mode 100644\nindex 0000000000..3059fb6473\n--- /dev/null\n+++ b/sysdeps/unix/sysv/linux/bits/cloexec.h\n@@ -0,0 +1 @@\n+#define __O_CLOEXEC 02000000\ndiff --git a/sysdeps/unix/sysv/linux/bits/fcntl-linux.h b/sysdeps/unix/sysv/linux/bits/fcntl-linux.h\nindex ad7f7c98c6..221a71aa62 100644\n--- a/sysdeps/unix/sysv/linux/bits/fcntl-linux.h\n+++ b/sysdeps/unix/sysv/linux/bits/fcntl-linux.h\n@@ -81,9 +81,7 @@\n #ifndef __O_NOFOLLOW\n # define __O_NOFOLLOW\t0400000\n #endif\n-#ifndef __O_CLOEXEC\n-# define __O_CLOEXEC 02000000\n-#endif\n+#include <bits/cloexec.h>\n #ifndef __O_DIRECT\n # define __O_DIRECT\t 040000\n #endif\ndiff --git a/sysdeps/unix/sysv/linux/hppa/bits/cloexec.h b/sysdeps/unix/sysv/linux/hppa/bits/cloexec.h\nnew file mode 100644\nindex 0000000000..f381f28a53\n--- /dev/null\n+++ b/sysdeps/unix/sysv/linux/hppa/bits/cloexec.h\n@@ -0,0 +1 @@\n+#define __O_CLOEXEC 010000000\ndiff --git a/sysdeps/unix/sysv/linux/sparc/bits/cloexec.h b/sysdeps/unix/sysv/linux/sparc/bits/cloexec.h\nnew file mode 100644\nindex 0000000000..6706eaa7d5\n--- /dev/null\n+++ b/sysdeps/unix/sysv/linux/sparc/bits/cloexec.h\n@@ -0,0 +1 @@\n+#define __O_CLOEXEC 0x400000\ndiff --git a/sysdeps/unix/sysv/linux/sys/mount.h b/sysdeps/unix/sysv/linux/sys/mount.h\nindex 457d8dcff2..5e496caf2f 100644\n--- a/sysdeps/unix/sysv/linux/sys/mount.h\n+++ b/sysdeps/unix/sysv/linux/sys/mount.h\n@@ -21,7 +21,6 @@\n #ifndef _SYS_MOUNT_H\n #define _SYS_MOUNT_H\t1\n \n-#include <fcntl.h>\n #include <features.h>\n #include <stdint.h>\n #include <stddef.h>\n@@ -266,6 +265,11 @@ enum fsconfig_command\n \n /* open_tree flags. */\n #define OPEN_TREE_CLONE 1 /* Clone the target tree and attach the clone */\n+#ifndef O_CLOEXEC\n+# include <bits/cloexec.h>\n+# define O_CLOEXEC __O_CLOEXEC\n+#endif\n+#undef OPEN_TREE_CLOEXEC\n #define OPEN_TREE_CLOEXEC O_CLOEXEC /* Close the file on execve() */\n \n \ndiff --git a/sysdeps/unix/sysv/linux/tst-mount.c b/sysdeps/unix/sysv/linux/tst-mount.c\nindex 8e3ffbd56f..84dcd448d4 100644\n--- a/sysdeps/unix/sysv/linux/tst-mount.c\n+++ b/sysdeps/unix/sysv/linux/tst-mount.c\n@@ -20,6 +20,7 @@\n #include <support/check.h>\n #include <support/xunistd.h>\n #include <support/namespace.h>\n+#include <fcntl.h> /* For AT_ constants. */\n #include <sys/mount.h>\n \n _Static_assert (sizeof (struct mount_attr) == MOUNT_ATTR_SIZE_VER0,\n", "prefixes": [ "v1" ] }