]> git.ipfire.org Git - thirdparty/systemd.git/commit - src/shared/dissect-image.c
src/shared/dissect-image.c: fix build without blkdid (#16901)
authorFabrice Fontaine <fontaine.fabrice@gmail.com>
Sat, 29 Aug 2020 21:17:18 +0000 (23:17 +0200)
committerGitHub <noreply@github.com>
Sat, 29 Aug 2020 21:17:18 +0000 (06:17 +0900)
commit28e2641a1aa506c5df93c7a0cb107aed8297b45e
treee05442be504439dee6bfbfc41a4f5a224673b477
parent9654645b62226263b923e79a0511fa8a4368d5dc
src/shared/dissect-image.c: fix build without blkdid (#16901)

N_DEVICE_NODE_LIST_ATTEMPTS is unconditionally used since version 246 and
https://github.com/systemd/systemd/commit/ac1f3ad05f7476ae58981dcba45dfeb2c0006824

However, this variable is only defined if HAVE_BLKID is set resulting in
the following build failure if cryptsetup is enabled but not libblkid:

../src/shared/dissect-image.c:1336:34: error: 'N_DEVICE_NODE_LIST_ATTEMPTS' undeclared (first use in this function)
 1336 |         for (unsigned i = 0; i < N_DEVICE_NODE_LIST_ATTEMPTS; i++) {
      |

Fixes:
 - http://autobuild.buildroot.org/results/67782c225c08387c1bbcbea9eee3ca12bc6577cd
src/shared/dissect-image.c