X-Git-Url: http://nsz.repo.hu/git/?a=blobdiff_plain;f=src%2Fstat%2Fmknod.c;h=beebd84e08995c36064ea67706ab7e48d95a48a1;hb=4f893997e4738faf6dde8320b304298340f51cd2;hp=90c6a1ca877ee9fb2e50862fbf12bb60452f80a4;hpb=aa398f56fa398f2202b04e82c67f822f3233786f;p=musl diff --git a/src/stat/mknod.c b/src/stat/mknod.c index 90c6a1ca..beebd84e 100644 --- a/src/stat/mknod.c +++ b/src/stat/mknod.c @@ -1,10 +1,12 @@ #include +#include #include "syscall.h" int mknod(const char *path, mode_t mode, dev_t dev) { - /* since dev_t is system-specific anyway we defer to the idiotic - * legacy-compatible bitfield mapping of the type.. at least we've - * made it large enough to leave space for future expansion.. */ - return syscall(SYS_mknod, path, mode, dev & 0xffff); +#ifdef SYS_mknod + return syscall(SYS_mknod, path, mode, dev); +#else + return syscall(SYS_mknodat, AT_FDCWD, path, mode, dev); +#endif }