diff options
| author | Leah Rowe <leah@libreboot.org> | 2026-03-16 18:18:44 +0000 |
|---|---|---|
| committer | Leah Rowe <leah@libreboot.org> | 2026-03-16 18:18:44 +0000 |
| commit | 7da3173ead8cdf8ceab72f09e73369bfbe03d28d (patch) | |
| tree | 2ab12c3a0055e6cd50a075089b4271206d60bc02 /util/nvmutil/nvmutil.c | |
| parent | 8bd04bc5ada5f8e952632503027034e27b9811de (diff) | |
util/nvmutil: portable S_IFMT
Signed-off-by: Leah Rowe <leah@libreboot.org>
Diffstat (limited to 'util/nvmutil/nvmutil.c')
| -rw-r--r-- | util/nvmutil/nvmutil.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/util/nvmutil/nvmutil.c b/util/nvmutil/nvmutil.c index b76f44eb..580dc163 100644 --- a/util/nvmutil/nvmutil.c +++ b/util/nvmutil/nvmutil.c @@ -713,6 +713,14 @@ int tmp_fd = -1; char *tname = NULL; #ifndef S_ISREG +#ifdef S_IFMT +#define S_ISREG(m) (((m) & S_IFMT) == S_IFREG) +#else +#define S_ISREG(m) (((m) & S_IFREG) == S_IFREG) +#endif +#endif + +#ifndef S_ISREG #define S_ISREG(m) (((m) & S_IFMT) == S_IFREG) #endif |
