Skip to content
This repository was archived by the owner on Oct 12, 2022. It is now read-only.

Commit 8d0c816

Browse files
committed
Fix Issue 19423 - In core.stdc.errno directly link __errno on OpenBSD & NetBSD
1 parent feb9616 commit 8d0c816

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed

src/core/stdc/errno.d

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,24 @@ else version (CRuntime_Musl)
7474
alias errno = __errno_location;
7575
}
7676
}
77+
else version (OpenBSD)
78+
{
79+
// https://github.com/openbsd/src/blob/master/include/errno.h
80+
extern (C)
81+
{
82+
ref int __errno();
83+
alias errno = __errno;
84+
}
85+
}
86+
else version (NetBSD)
87+
{
88+
// https://github.com/NetBSD/src/blob/trunk/include/errno.h
89+
extern (C)
90+
{
91+
ref int __errno();
92+
alias errno = __errno;
93+
}
94+
}
7795
else version (FreeBSD)
7896
{
7997
extern (C)

0 commit comments

Comments
 (0)