]> git.ipfire.org Git - thirdparty/util-linux.git/commitdiff
libblkid: check for ioctl macro rather than for header file
authorKarel Zak <kzak@redhat.com>
Wed, 9 Jun 2021 14:12:13 +0000 (16:12 +0200)
committerKarel Zak <kzak@redhat.com>
Wed, 9 Jun 2021 14:12:13 +0000 (16:12 +0200)
libblkid/src/probe.c:1012:22: error: ‘BLKGETZONESZ’ undeclared (first use in this function)
 1012 |   if (!ioctl(pr->fd, BLKGETZONESZ, &zone_size_sector))
      |                      ^~~~~~~~~~~~

Signed-off-by: Karel Zak <kzak@redhat.com>
libblkid/src/probe.c

index 602559605fa9491f37572886d7ee80711b175f14..9adc4cf76399125137d3b4cc60de59bf9de03e6a 100644 (file)
@@ -1005,7 +1005,7 @@ int blkid_probe_set_device(blkid_probe pr, int fd,
 #endif
        free(dm_uuid);
 
-# ifdef HAVE_LINUX_BLKZONED_H
+# ifdef BLKGETZONESZ
        if (S_ISBLK(sb.st_mode)) {
                uint32_t zone_size_sector;