mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-04-29 07:48:47 +00:00
LibC: Make makedev()/minor()/major() static
As we've opted to make these inline functions and not macros, let's at least make sure that the users don't *observe* multiple definitions of these functions.
This commit is contained in:
parent
e37f9fa7db
commit
727403746f
Notes:
sideshowbarker
2024-07-18 10:00:18 +09:00
Author: https://github.com/alimpfard
Commit: 727403746f
Pull-request: https://github.com/SerenityOS/serenity/pull/8572
1 changed files with 3 additions and 3 deletions
|
@ -89,8 +89,8 @@ typedef struct __pthread_condattr_t {
|
||||||
int clockid; // clockid_t
|
int clockid; // clockid_t
|
||||||
} pthread_condattr_t;
|
} pthread_condattr_t;
|
||||||
|
|
||||||
inline dev_t makedev(unsigned int major, unsigned int minor) { return (minor & 0xffu) | (major << 8u) | ((minor & ~0xffu) << 12u); }
|
static 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; }
|
static 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 unsigned int minor(dev_t dev) { return (dev & 0xffu) | ((dev >> 12u) & 0xfff00u); }
|
||||||
|
|
||||||
__END_DECLS
|
__END_DECLS
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue