diff --git a/Libraries/LibC/stat.cpp b/Libraries/LibC/stat.cpp index e12252b943..e1abc7905c 100644 --- a/Libraries/LibC/stat.cpp +++ b/Libraries/LibC/stat.cpp @@ -30,6 +30,7 @@ #include #include #include +#include extern "C" { @@ -63,4 +64,9 @@ int fchmod(int fd, mode_t mode) int rc = syscall(SC_fchmod, fd, mode); __RETURN_WITH_ERRNO(rc, rc, -1); } + +int mkfifo(const char* pathname, mode_t mode) +{ + return mknod(pathname, mode | S_IFIFO, 0); +} } diff --git a/Libraries/LibC/sys/stat.h b/Libraries/LibC/sys/stat.h index 6d32e99c8c..61c60b8977 100644 --- a/Libraries/LibC/sys/stat.h +++ b/Libraries/LibC/sys/stat.h @@ -60,6 +60,7 @@ mode_t umask(mode_t); int chmod(const char* pathname, mode_t); int fchmod(int fd, mode_t); int mkdir(const char* pathname, mode_t); +int mkfifo(const char* pathname, mode_t); inline dev_t makedev(unsigned int major, unsigned int minor) { return (minor & 0xffu) | (major << 8u) | ((minor & ~0xffu) << 12u); } inline unsigned int major(dev_t dev) { return (dev & 0xfff00u) >> 8u; }