]> git.ipfire.org Git - thirdparty/util-linux.git/commitdiff
fdisk: guard posix variable
authorThomas Weißschuh <thomas@t-8ch.de>
Sun, 24 Dec 2023 10:47:02 +0000 (11:47 +0100)
committerThomas Weißschuh <thomas@t-8ch.de>
Tue, 26 Dec 2023 11:18:27 +0000 (12:18 +0100)
Otherwise it can generate a unused variable warning.

Signed-off-by: Thomas Weißschuh <thomas@t-8ch.de>
sys-utils/fallocate.c

index 86d17dbf1e9ba7d0d1e09dd2a033548803fd2001..19fb87ff79b3e77c9da32c109b214de472dbac6a 100644 (file)
@@ -290,7 +290,9 @@ int main(int argc, char **argv)
        int     fd;
        int     mode = 0;
        int     dig = 0;
-       int posix = 0;
+#ifdef HAVE_POSIX_FALLOCATE
+       int     posix = 0;
+#endif
        loff_t  length = -2LL;
        loff_t  offset = 0;