From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-pl1-f179.google.com (mail-pl1-f179.google.com [209.85.214.179]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 8D9E42D249E for ; Sun, 15 Feb 2026 14:28:20 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.214.179 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1771165701; cv=none; b=tvffFgPW1CTh+8d9wS7IMvAFBYVRMOWYKxr0lY7F62NDI6ZqzM0c7spRsp86cFn4jjsl/T+j/204SzyDRJKFMS8/ZqYE9GytsZUiUlk+7L/210uuIAj+upfjCDso+gTYDsLIQ6k699ha23eoX/lvUkl3SpvFBZuyBwMMyTOua3I= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1771165701; c=relaxed/simple; bh=d4TtD57WjYmCyn9A+/6pDIflGOXdh2JVXMegSnNK2A0=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=flumyxFUz3hHsAEIYvlkWL351ToVb5sgP+covET9vfFdgIBGK+QvYXrD3MBsQcZAg6546COPsK3NSQvMxJLpvXwv86FdKMIqtlwMOcDswhWNHXY5JVyzqO2s4ngFPxHTey+rH74zWGpu8Wk1jxlnJo0aH27kx62x5eOu9Ass+fo= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=ns5hcwK3; arc=none smtp.client-ip=209.85.214.179 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="ns5hcwK3" Received: by mail-pl1-f179.google.com with SMTP id d9443c01a7336-2a929245b6aso26014105ad.0 for ; Sun, 15 Feb 2026 06:28:20 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1771165700; x=1771770500; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=+ABeDiezQDLnVh+YeCRm+MqNQxddgh777bvsSpmm8Jk=; b=ns5hcwK3Zf5+CnQGvP9IVBAt6UbO86wJKooAF+Txd+OST1IWZMo4ycsAsbrXIsgwkt WFMoyoz+msvu7dLE7DK2aoKzMChRcJ2vR5ruHENDD2pizbcmxq2R2ozIhHBaYR4OqIRT 2WVs+rG0hjrn7aMVtztgVd8yXwhm6SADfGjwym08wGMbxD5fZcrqgDR00KeOjRN3Gz7J naf3z+GC0oj6gH6D6FShb8r2bKU6ZCdMLCkeAPwZRh33DRBbMea5aNbd6cNRs1/prnR7 dRLyhE0bkbMmKCnWtCDI7CH29bY8NrO1N4ywFdX105ke2BEQJuPPyGujN1b103udah1G cKXg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1771165700; x=1771770500; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-gg:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=+ABeDiezQDLnVh+YeCRm+MqNQxddgh777bvsSpmm8Jk=; b=NbjD/fa05UpJ2i5/w80OKMzUIOVR4F1MxmDsGVY8WIoZdrsN2k9tafUiO5wnx7ubk9 /qF9m1p8Kz1q0dl7DjQUhOCu7JdttfXix/ik09Jd9SUCjUWu58l/EKF+yo8DWd7eAwIb 20CKHlNexMLrFIvviw+2xeSvu08qpiByHnw1vLgIEO7b4bsqV0b/cD0MAaJW5AgQH5xs B11XBQVsT0fg5Ie0KdUa82kHDtbCIo6kxfhFCMpBULg7xZqhcCYB2LoTuSHno636hQRT VDxPOQPjI3ELqkCajmiD1SToA0LHsUvLsMUOIFYhfnoAy5W9wL+Jyp90fRik365DowaR GIsA== X-Forwarded-Encrypted: i=1; AJvYcCX2pDU398Hc80N+AIvDVri0/6Mvdw/yehK7f9tmcPQmTKpOJxwfOiZMDpJZEE1Vlm2IWdlT+ufIzH7maQU=@vger.kernel.org X-Gm-Message-State: AOJu0YwbFjldPaiQUhx5aGokZgWTL3xQOIiSfQQ6cYYzkG9/c0qEEfQ0 qzwfPSEIIOnlPnT8DWh6DaaGiw2lmcbM55mm2kk89LWqN1nHEH0iMw7Z X-Gm-Gg: AZuq6aLowoCuelNEUtH/CnCQrXZH+aCKhY6AMgGjtyNYN61+Ij7djecY758TgB/btLO zuBYfyoDl6av2rbKVgitidjmvzkm2zEsG8H+zrimtt2ypQyknl1iZSfbLM+6A8to2VvH80ZPZEJ 6b1tqdk9F64U3kRn0TikJyGAodZHCjzzS8zHyjkruEUzVnxnwIjEx2UC0D0Eumn1Tzvvng7Ab4s gwJTKS3EBLmv1411dyvQR6F8dz6zpnHCrlyqV5vuqq65x/9yFlVShWsNo3sRtlDfQmZP5Eng8Lk uNOh3XNo4ikqjS6H10/kzCtih7h0pT7ZV0uPURyOTVYAlblfNHQVjEv3NUmhF39SJE34LB9n5/L zKbhqNKNn2j8ViB2n68tcYDsJ9YRWD/zoUrQ7YnuBW+ogjGOFQ0JFuvmjGGIwccPtae+bZe8C2B 8GW4vpq4JdsNYUlXHchOX5+c4Hx/XlUi9Akz+rkApiYXZ9Qu3ku8f1EBmm X-Received: by 2002:a17:903:1b67:b0:2a0:c35c:572e with SMTP id d9443c01a7336-2ad17501af0mr57032485ad.30.1771165699900; Sun, 15 Feb 2026 06:28:19 -0800 (PST) Received: from speedy3.lan ([116.197.216.237]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-2ad1ace5bd1sm45617415ad.90.2026.02.15.06.28.18 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 15 Feb 2026 06:28:19 -0800 (PST) From: "Marcel W. Wysocki" To: Richard Weinberger , Anton Ivanov , Johannes Berg Cc: linux-um@lists.infradead.org, linux-kernel@vger.kernel.org, "Marcel W . Wysocki" Subject: [PATCH 2/2] um: avoid struct sigcontext redefinition with musl Date: Sun, 15 Feb 2026 22:28:03 +0800 Message-ID: <20260215142803.1455757-2-maci.stgn@gmail.com> X-Mailer: git-send-email 2.53.0 In-Reply-To: <20260215142803.1455757-1-maci.stgn@gmail.com> References: <20260215142803.1455757-1-maci.stgn@gmail.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit mcontext.c includes both and . With musl libc, this causes a struct sigcontext redefinition error: pulls in musl's , which defines struct sigcontext directly. The kernel's then provides a second, conflicting definition of the same struct. With glibc this does not conflict because glibc's signal headers source their struct sigcontext from the kernel's own UAPI headers, so the include guard in makes the second inclusion a no-op. mcontext.c does not actually use struct sigcontext by name -- it only needs the FP-state types (_fpstate, _xstate, etc.) that are defined in independently of the sigcontext struct. Temporarily rename sigcontext to __kernel_sigcontext during the inclusion of so that the kernel's definition does not collide with musl's. The #undef restores normal name resolution immediately afterward. No functional change with glibc; fixes the build with musl. Signed-off-by: Marcel W. Wysocki --- arch/x86/um/os-Linux/mcontext.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/arch/x86/um/os-Linux/mcontext.c b/arch/x86/um/os-Linux/mcontext.c --- a/arch/x86/um/os-Linux/mcontext.c +++ b/arch/x86/um/os-Linux/mcontext.c @@ -4,7 +4,13 @@ #include #include #include +/* + * musl defines struct sigcontext in . Rename the kernel's + * copy to avoid redefinition while keeping the FP-state types available. + */ +#define sigcontext __kernel_sigcontext #include +#undef sigcontext #include #include #include