diff --git a/libc/include/sys/sysmacros.h b/libc/include/sys/sysmacros.h new file mode 100644 index 0000000000..7d17574a13 --- /dev/null +++ b/libc/include/sys/sysmacros.h @@ -0,0 +1,8 @@ +#pragma once + +#include + +#define makedev(maj, min) ((dev_t)(maj) << 32 | (dev_t)(min)) + +#define major(dev) (((dev) >> 32) & 0xFFFFFFFF) +#define minor(dev) ( (dev) & 0xFFFFFFFF)