util/nvmutil: portable S_IFMT

Signed-off-by: Leah Rowe <leah@libreboot.org>
This commit is contained in:
Leah Rowe
2026-03-16 18:18:44 +00:00
parent 8bd04bc5ad
commit 7da3173ead

View File

@@ -712,6 +712,14 @@ ino_t tmp_ino;
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