sys/types.h: add major/minor/makedev trio
authorAlan Cox <alan@linux.intel.com>
Thu, 22 Sep 2016 21:48:14 +0000 (22:48 +0100)
committerAlan Cox <alan@linux.intel.com>
Thu, 22 Sep 2016 21:48:14 +0000 (22:48 +0100)
Library/include/sys/types.h

index bae1373..8b272b3 100644 (file)
@@ -77,4 +77,9 @@ typedef struct {
 #endif
 typedef int32_t clock_t;
 typedef uint32_t useconds_t;
+
+#define makedev(a,b)   (((a) << 8) | (b))
+#define major(x)       ((x) >> 8)
+#define minor(x)       ((x) & 0xFF)
+
 #endif