diff --git a/Userland/Libraries/LibC/sys/stat.h b/Userland/Libraries/LibC/sys/stat.h index ed0936985c7..46e9f48f0eb 100644 --- a/Userland/Libraries/LibC/sys/stat.h +++ b/Userland/Libraries/LibC/sys/stat.h @@ -78,8 +78,4 @@ int fstat(int fd, struct stat* statbuf); int lstat(const char* path, struct stat* statbuf); int stat(const char* path, struct stat* statbuf); -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; } -inline unsigned int minor(dev_t dev) { return (dev & 0xffu) | ((dev >> 12u) & 0xfff00u); } - __END_DECLS diff --git a/Userland/Libraries/LibC/sys/types.h b/Userland/Libraries/LibC/sys/types.h index dd56e5be976..0694f19a966 100644 --- a/Userland/Libraries/LibC/sys/types.h +++ b/Userland/Libraries/LibC/sys/types.h @@ -91,4 +91,8 @@ typedef struct __pthread_condattr_t { int clockid; // clockid_t } pthread_condattr_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; } +inline unsigned int minor(dev_t dev) { return (dev & 0xffu) | ((dev >> 12u) & 0xfff00u); } + __END_DECLS diff --git a/Userland/Utilities/ls.cpp b/Userland/Utilities/ls.cpp index 8c56b027519..948515a98d8 100644 --- a/Userland/Utilities/ls.cpp +++ b/Userland/Utilities/ls.cpp @@ -26,6 +26,7 @@ #include #include #include +#include #include #include diff --git a/Userland/Utilities/stat.cpp b/Userland/Utilities/stat.cpp index 1abca9507a4..f13e34d1d21 100644 --- a/Userland/Utilities/stat.cpp +++ b/Userland/Utilities/stat.cpp @@ -13,6 +13,7 @@ #include #include #include +#include #include #include