From 3b188b4d2b3a992bd284fdeb591050924f7bd991 Mon Sep 17 00:00:00 2001 From: Leah Rowe Date: Mon, 9 Mar 2026 05:16:57 +0000 Subject: util/nvmutil: specifically enable -std=c99 I also needed: #define _POSIX_C_SOURCE 200809L I use -pedantic with -Wall -Wextra -Werror, which forces very strict error handling and ISO C; this means pread and pwrite aren't available. The define fixes this. Signed-off-by: Leah Rowe --- util/nvmutil/Makefile | 2 +- util/nvmutil/nvmutil.c | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) (limited to 'util/nvmutil') diff --git a/util/nvmutil/Makefile b/util/nvmutil/Makefile index 91b5ba1c..c6611075 100644 --- a/util/nvmutil/Makefile +++ b/util/nvmutil/Makefile @@ -3,7 +3,7 @@ # SPDX-FileCopyrightText: 2023 Riku Viitanen CC?=cc -CFLAGS?=-Os -Wall -Wextra -Werror -pedantic +CFLAGS?=-Os -Wall -Wextra -Werror -pedantic -std=c99 -D_POSIX_C_SOURCE=200809L DESTDIR?= PREFIX?=/usr/local INSTALL?=install diff --git a/util/nvmutil/nvmutil.c b/util/nvmutil/nvmutil.c index 3ec92048..5aa000a2 100644 --- a/util/nvmutil/nvmutil.c +++ b/util/nvmutil/nvmutil.c @@ -2,6 +2,8 @@ /* Copyright (c) 2022-2026 Leah Rowe */ /* Copyright (c) 2023 Riku Viitanen */ +#define _POSIX_C_SOURCE 200809L + #ifdef __OpenBSD__ #include #endif -- cgit v1.2.1