diff options
| author | Leah Rowe <leah@libreboot.org> | 2026-03-16 15:23:20 +0000 |
|---|---|---|
| committer | Leah Rowe <leah@libreboot.org> | 2026-03-16 15:23:20 +0000 |
| commit | 36344f84b5e62c8782c643050a887d7abe11bbbf (patch) | |
| tree | c831f16dc658833b942a22a180784c89de4ecdc5 /util/nvmutil/nvmutil.c | |
| parent | 06ff9d27e85e56c6e3a9d499c1a46601e8a10f76 (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/nvmutil/nvmutil.c')
| -rw-r--r-- | util/nvmutil/nvmutil.c | 4 |
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[]) { |
