www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 23161] New: __mode_t defined twice for musl for non x86 arches

https://issues.dlang.org/show_bug.cgi?id=23161

          Issue ID: 23161
           Summary: __mode_t  defined twice for musl for non x86 arches
           Product: D
           Version: D2
          Hardware: x86
                OS: Linux
            Status: NEW
          Severity: regression
          Priority: P1
         Component: druntime
          Assignee: nobody puremagic.com
          Reporter: dunk denkimushi.com

Compilation fails for aarch64 for ldc 1.29.0 on alpine linux which includes a
bundled druntime

https://gitlab.alpinelinux.org/a16bitsysop/aports/-/jobs/737278#L468

If Musl is detected __mode_t is defined here:
https://github.com/dlang/druntime/blob/9b17410d08b6dd280f71603124519d91c4a4a4d5/src/core/sys/posix/sys/stat.d#L1660

But it is also defined for HPPA:
https://github.com/dlang/druntime/blob/9b17410d08b6dd280f71603124519d91c4a4a4d5/src/core/sys/posix/sys/stat.d#L170

RISCV:
https://github.com/dlang/druntime/blob/9b17410d08b6dd280f71603124519d91c4a4a4d5/src/core/sys/posix/sys/stat.d#L486

ARM:
https://github.com/dlang/druntime/blob/9b17410d08b6dd280f71603124519d91c4a4a4d5/src/core/sys/posix/sys/stat.d#L568

Aarch64:
https://github.com/dlang/druntime/blob/9b17410d08b6dd280f71603124519d91c4a4a4d5/src/core/sys/posix/sys/stat.d#L663

Sparc:
https://github.com/dlang/druntime/blob/9b17410d08b6dd280f71603124519d91c4a4a4d5/src/core/sys/posix/sys/stat.d#L749

S390:
https://github.com/dlang/druntime/blob/9b17410d08b6dd280f71603124519d91c4a4a4d5/src/core/sys/posix/sys/stat.d#L841

SystemZ
https://github.com/dlang/druntime/blob/9b17410d08b6dd280f71603124519d91c4a4a4d5/src/core/sys/posix/sys/stat.d#L917

Currently ldc only compiles on alpine for x86_64 and aarch64

--
Jun 05 2022