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

Commit 2f2a68e

Browse files
ibaradlang-bot
authored andcommitted
Add core.sys.openbsd.pwd module.
Fix Issue 22908 - OpenBSD: Add getpwnam_shadow and getpwuid_shadow function prototypes
1 parent ec29c98 commit 2f2a68e

File tree

3 files changed

+21
-0
lines changed

3 files changed

+21
-0
lines changed

mak/COPY

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -262,6 +262,7 @@ COPY=\
262262
$(IMPDIR)\core\sys\openbsd\err.d \
263263
$(IMPDIR)\core\sys\openbsd\execinfo.d \
264264
$(IMPDIR)\core\sys\openbsd\pthread_np.d \
265+
$(IMPDIR)\core\sys\openbsd\pwd.d \
265266
$(IMPDIR)\core\sys\openbsd\stdlib.d \
266267
$(IMPDIR)\core\sys\openbsd\string.d \
267268
$(IMPDIR)\core\sys\openbsd\time.d \

mak/SRCS

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -262,6 +262,7 @@ SRCS=\
262262
src\core\sys\openbsd\err.d \
263263
src\core\sys\openbsd\execinfo.d \
264264
src\core\sys\openbsd\pthread_np.d \
265+
src\core\sys\openbsd\pwd.d \
265266
src\core\sys\openbsd\stdlib.d \
266267
src\core\sys\openbsd\string.d \
267268
src\core\sys\openbsd\time.d \

src/core/sys/openbsd/pwd.d

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
/**
2+
* D header file for OpenBSD pwd.h.
3+
*
4+
* Copyright: Copyright © 2022, The D Language Foundation
5+
* License: <a href="http://www.boost.org/LICENSE_1_0.txt">Boost License 1.0</a>.
6+
* Authors: Brian Callahan
7+
*/
8+
module core.sys.openbsd.pwd;
9+
10+
version (OpenBSD):
11+
extern (C):
12+
nothrow:
13+
@nogc:
14+
15+
public import core.sys.posix.pwd;
16+
import core.sys.posix.sys.types : uid_t;
17+
18+
passwd* getpwnam_shadow(scope const char*);
19+
passwd* getpwuid_shadow(uid_t);

0 commit comments

Comments
 (0)