summaryrefslogtreecommitdiff
path: root/util
diff options
context:
space:
mode:
authorLeah Rowe <leah@libreboot.org>2026-03-16 15:23:20 +0000
committerLeah Rowe <leah@libreboot.org>2026-03-26 06:59:41 +0000
commitea71010f851dcb4e9aa95716b6dee1099be02168 (patch)
treea2d70c71d84e2f68d2f8254932ab75268a8f68ec /util
parent6a898dff726d9b33a28498d48c6ebb9c0f38c496 (diff)
util/nvmutil: portable S_ISREG
very old libc doesn't have it Signed-off-by: Leah Rowe <leah@libreboot.org>
Diffstat (limited to 'util')
-rw-r--r--util/nvmutil/nvmutil.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/util/nvmutil/nvmutil.c b/util/nvmutil/nvmutil.c
index d6f83570..f5c588be 100644
--- a/util/nvmutil/nvmutil.c
+++ b/util/nvmutil/nvmutil.c
@@ -701,6 +701,10 @@ int fchmod(int fd, mode_t mode);
static int tmp_fd = -1;
static char *tname = NULL;
+#ifndef S_ISREG
+#define S_ISREG(m) (((m) & S_IFMT) == S_IFREG)
+#endif
+
int
main(int argc, char *argv[])
{