diff --git a/std/process.d b/std/process.d index d359ca0bae4..ba3788d9c03 100644 --- a/std/process.d +++ b/std/process.d @@ -1036,7 +1036,7 @@ private Pid spawnProcessPosix(scope const(char[])[] args, { void fallback (int lowfd) { - import core.sys.posix.dirent : dirent, opendir, readdir, closedir, DIR; + import core.sys.posix.dirent : dirfd, dirent, opendir, readdir, closedir, DIR; import core.sys.posix.unistd : close; import core.sys.posix.stdlib : atoi, malloc, free; import core.sys.posix.sys.resource : rlimit, getrlimit, RLIMIT_NOFILE; @@ -1048,10 +1048,6 @@ private Pid spawnProcessPosix(scope const(char[])[] args, immutable maxDescriptors = cast(int) r.rlim_cur; - // Missing druntime declaration - pragma(mangle, "dirfd") - extern(C) nothrow @nogc int dirfd(DIR* dir); - DIR* dir = null; // We read from /dev/fd or /proc/self/fd only if the limit is high enough