From 0ad84618aca612fafdaa2e1e12c1449970a2217d Mon Sep 17 00:00:00 2001 From: Alan Cox Date: Thu, 22 Sep 2016 22:48:14 +0100 Subject: [PATCH] sys/types.h: add major/minor/makedev trio --- Library/include/sys/types.h | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/Library/include/sys/types.h b/Library/include/sys/types.h index bae13731..8b272b33 100644 --- a/Library/include/sys/types.h +++ b/Library/include/sys/types.h @@ -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 -- 2.34.1