diff --git a/libc/include/sys/sysmacros.h b/libc/include/sys/sysmacros.h new file mode 100644 index 00000000..7d17574a --- /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)