pmaports/cross/gcc-aarch64/0050-libphobos-don-t-define-__mode_t-twice-on-musl-target.patch

76 lines
2.9 KiB
Diff
Raw Normal View History

From 01be086df55016ad676685c6b0dca6aa11330bfc Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?S=C3=B6ren=20Tempel?= <soeren+git@soeren-tempel.net>
Date: Sun, 17 Jul 2022 13:38:39 +0200
Subject: [PATCH] libphobos: don't define __mode_t twice on musl targets
For musl targets, __mode_t is already aliased to uint, thus if it
aliased in an architecture-specific if-case then it is defined twice
which causes a build error.
To-Do: Report this upstream or revise this patch in a way that is also
works with glibc and submit that upstream.
---
libphobos/libdruntime/core/sys/posix/sys/stat.d | 7 -------
1 file changed, 7 deletions(-)
diff --git a/libphobos/libdruntime/core/sys/posix/sys/stat.d b/libphobos/libdruntime/core/sys/posix/sys/stat.d
index 1fb4e44cbbf..ca31bbb7ccf 100644
--- a/libphobos/libdruntime/core/sys/posix/sys/stat.d
+++ b/libphobos/libdruntime/core/sys/posix/sys/stat.d
@@ -167,7 +167,6 @@ version (linux)
alias __dev_t = ulong;
alias __ino_t = c_ulong;
alias __ino64_t = ulong;
- alias __mode_t = uint;
alias __nlink_t = size_t;
alias __uid_t = uint;
alias __gid_t = uint;
@@ -483,7 +482,6 @@ version (linux)
alias __dev_t = ulong;
alias __ino_t = c_ulong;
alias __ino64_t = ulong;
- alias __mode_t = uint;
alias __nlink_t = uint;
alias __uid_t = uint;
alias __gid_t = uint;
@@ -565,7 +563,6 @@ version (linux)
alias __dev_t = ulong;
alias __ino_t = c_ulong;
alias __ino64_t = ulong;
- alias __mode_t = uint;
alias __nlink_t = size_t;
alias __uid_t = uint;
alias __gid_t = uint;
@@ -660,7 +657,6 @@ version (linux)
alias __dev_t = ulong;
alias __ino_t = c_ulong;
alias __ino64_t = ulong;
- alias __mode_t = uint;
alias __nlink_t = uint;
alias __uid_t = uint;
alias __gid_t = uint;
@@ -746,7 +742,6 @@ version (linux)
alias __dev_t = ulong;
alias __ino_t = c_ulong;
alias __ino64_t = ulong;
- alias __mode_t = uint;
alias __nlink_t = uint;
alias __uid_t = uint;
alias __gid_t = uint;
@@ -838,7 +833,6 @@ version (linux)
alias __dev_t = ulong;
alias __ino_t = c_ulong;
alias __ino64_t = ulong;
- alias __mode_t = uint;
alias __nlink_t = uint;
alias __uid_t = uint;
alias __gid_t = uint;
@@ -914,7 +908,6 @@ version (linux)
alias __dev_t = ulong;
alias __ino_t = c_ulong;
alias __ino64_t = ulong;
- alias __mode_t = uint;
alias __nlink_t = ulong;
alias __uid_t = uint;
alias __gid_t = uint;