From e946b392c93c22658b3f978cf2a578a54a65a152 Mon Sep 17 00:00:00 2001 From: Bananymous Date: Wed, 14 Feb 2024 03:43:31 +0200 Subject: [PATCH] LibC: Add definition for S_IFMT I was using S_IFMASK, but linux seems to use this --- libc/include/sys/stat.h | 1 + 1 file changed, 1 insertion(+) diff --git a/libc/include/sys/stat.h b/libc/include/sys/stat.h index 7682e47c..87337747 100644 --- a/libc/include/sys/stat.h +++ b/libc/include/sys/stat.h @@ -66,6 +66,7 @@ struct stat #define S_IFLNK ((mode_t)0120000) #define S_IFSOCK ((mode_t)0140000) #define S_IFMASK ((mode_t)0170000) +#define S_IFMT S_IFMASK #define S_ISBLK(mode) ((mode & S_IFMASK) == S_IFBLK) #define S_ISCHR(mode) ((mode & S_IFMASK) == S_IFCHR)