diff options
author | Itamar <itamar8910@gmail.com> | 2021-08-16 23:06:49 +0300 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2021-08-16 23:26:52 +0200 |
commit | f3aa87c436e24fc535e8df8e596264a1183be2e2 (patch) | |
tree | bc7da5f3330163c1207a0d3b16f05336b88c6f64 /Kernel | |
parent | 0fba71a6550753e13d9561ab80f6885981b4aa70 (diff) | |
download | serenity-f3aa87c436e24fc535e8df8e596264a1183be2e2.zip |
Kernel: Make makedev()/minor()/major() static
This was originally done in 7274037 and for some reason reverted in
740140a.
This avoids "multiple definitions" link errors and fixes the libuv port.
Diffstat (limited to 'Kernel')
-rw-r--r-- | Kernel/API/POSIX/sys/types.h | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/Kernel/API/POSIX/sys/types.h b/Kernel/API/POSIX/sys/types.h index 3029e0a101..2ff467b9c0 100644 --- a/Kernel/API/POSIX/sys/types.h +++ b/Kernel/API/POSIX/sys/types.h @@ -92,9 +92,9 @@ typedef struct __pthread_condattr_t { int clockid; // clockid_t } pthread_condattr_t; -inline dev_t makedev(unsigned major, unsigned 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); } +static inline dev_t makedev(unsigned major, unsigned minor) { return (minor & 0xffu) | (major << 8u) | ((minor & ~0xffu) << 12u); } +static inline unsigned int major(dev_t dev) { return (dev & 0xfff00u) >> 8u; } +static inline unsigned int minor(dev_t dev) { return (dev & 0xffu) | ((dev >> 12u) & 0xfff00u); } #ifdef __cplusplus } |