Explorar el Código

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.
Ali Mohammad Pur hace 4 años
padre
commit
727403746f
Se han modificado 1 ficheros con 3 adiciones y 3 borrados
  1. 3 3
      Userland/Libraries/LibC/sys/types.h

+ 3 - 3
Userland/Libraries/LibC/sys/types.h

@@ -89,8 +89,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); }
+static inline dev_t makedev(unsigned int major, unsigned int 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); }
 
 __END_DECLS