From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id B7217385803F; Thu, 3 Mar 2022 14:19:52 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org B7217385803F From: "Arfrever.FTA at GMail dot Com" To: glibc-bugs@sourceware.org Subject: [Bug libc/28938] New: [csky, microblaze, or1k, powerpc] typedef for greg_t missing in sys/ucontext.h on some architectures Date: Thu, 03 Mar 2022 14:19:52 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: glibc X-Bugzilla-Component: libc X-Bugzilla-Version: unspecified X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: Arfrever.FTA at GMail dot Com X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Resolution: X-Bugzilla-Priority: P2 X-Bugzilla-Assigned-To: unassigned at sourceware dot org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_id short_desc product version bug_status bug_severity priority component assigned_to reporter cc target_milestone Message-ID: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://sourceware.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-BeenThere: glibc-bugs@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Glibc-bugs mailing list List-Unsubscribe: , List-Archive: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 03 Mar 2022 14:19:52 -0000 https://sourceware.org/bugzilla/show_bug.cgi?id=3D28938 Bug ID: 28938 Summary: [csky, microblaze, or1k, powerpc] typedef for greg_t missing in sys/ucontext.h on some architectures Product: glibc Version: unspecified Status: UNCONFIRMED Severity: normal Priority: P2 Component: libc Assignee: unassigned at sourceware dot org Reporter: Arfrever.FTA at GMail dot Com CC: drepper.fsp at gmail dot com Target Milestone: --- Original bug report: https://bugs.gentoo.org/834450 > In file included from include/libucontext/libucontext.h:5, > from arch/ppc/makecontext.c:19: > include/libucontext/bits.h:8:9: error: unknown type name 'greg_t' > 8 | typedef greg_t libucontext_greg_t; > | ^~~~~~ In glibc 2.35: The following sys/ucontext.h files define both greg_t and gregset_t: sysdeps/arm/sys/ucontext.h sysdeps/i386/sys/ucontext.h sysdeps/m68k/sys/ucontext.h sysdeps/mips/sys/ucontext.h sysdeps/unix/sysv/linux/aarch64/sys/ucontext.h sysdeps/unix/sysv/linux/alpha/sys/ucontext.h sysdeps/unix/sysv/linux/arm/sys/ucontext.h sysdeps/unix/sysv/linux/hppa/sys/ucontext.h sysdeps/unix/sysv/linux/m68k/sys/ucontext.h sysdeps/unix/sysv/linux/mips/sys/ucontext.h sysdeps/unix/sysv/linux/riscv/sys/ucontext.h sysdeps/unix/sysv/linux/s390/sys/ucontext.h sysdeps/unix/sysv/linux/sh/sys/ucontext.h sysdeps/unix/sysv/linux/sparc/sys/ucontext.h sysdeps/unix/sysv/linux/x86/sys/ucontext.h The following sys/ucontext.h files define gregset_t, but not greg_t: sysdeps/unix/sysv/linux/csky/sys/ucontext.h sysdeps/unix/sysv/linux/powerpc/sys/ucontext.h The following sys/ucontext.h files do not define greg_t or gregset_t: sysdeps/generic/sys/ucontext.h sysdeps/unix/sysv/linux/arc/sys/ucontext.h sysdeps/unix/sysv/linux/ia64/sys/ucontext.h sysdeps/unix/sysv/linux/microblaze/sys/ucontext.h sysdeps/unix/sysv/linux/nios2/sys/ucontext.h sysdeps/unix/sysv/linux/or1k/sys/ucontext.h In musl, sys/ucontext.h includes ucontext.h, which includes signal.h, which includes bits/signal.h. In musl, the following bits/signal.h files define greg_t and gregset_t: arch/aarch64/bits/signal.h arch/arm/bits/signal.h arch/i386/bits/signal.h arch/m68k/bits/signal.h arch/microblaze/bits/signal.h arch/mips/bits/signal.h arch/mips64/bits/signal.h arch/mipsn32/bits/signal.h arch/or1k/bits/signal.h arch/powerpc/bits/signal.h arch/powerpc64/bits/signal.h arch/riscv64/bits/signal.h arch/s390x/bits/signal.h arch/sh/bits/signal.h arch/x32/bits/signal.h arch/x86_64/bits/signal.h In glibc, typedef for greg_t needs to be added at least in: sysdeps/unix/sysv/linux/powerpc/sys/ucontext.h (In musl, in arch/powerpc/bits/signal.h: 'typedef unsigned long greg_t, gregset_t[48]') (In musl, in arch/powerpc64/bits/signal.h: 'typedef unsigned long greg_t, gregset_t[48]') And probably also in: sysdeps/unix/sysv/linux/csky/sys/ucontext.h (Not supported by musl, but 'typedef unsigned long greg_t' seems obvious.) sysdeps/unix/sysv/linux/microblaze/sys/ucontext.h (In musl: 'typedef unsigned long greg_t, gregset_t[38]') sysdeps/unix/sysv/linux/or1k/sys/ucontext.h (In musl: 'typedef unsigned long greg_t, gregset_t[34]') --=20 You are receiving this mail because: You are on the CC list for the bug.=