src/basic/missing_loop.h: fix missing LOOP_SET_BLOCK_SIZE
authorRaphaël Mélotte <raphael.melotte@mind.be>
Fri, 14 Jun 2024 12:37:29 +0000 (14:37 +0200)
committerLuca Boccassi <luca.boccassi@gmail.com>
Fri, 14 Jun 2024 23:01:44 +0000 (00:01 +0100)
commit56ab1c54497d9fac74380ff9e11aaf931a917d2b
tree725949eeddc70c1ec6b04c5861596523da3b4fd7
parent9ebcac3b5125a8b0b11f371731ea167cd4684adc
src/basic/missing_loop.h: fix missing LOOP_SET_BLOCK_SIZE

Builds with kernels headers < 4.14 fail with:

../src/shared/loop-util.c: In function ‘loop_configure_fallback’:
../src/shared/loop-util.c:237:31: error: ‘LOOP_SET_BLOCK_SIZE’ undeclared (first use in this function); did you mean ‘LOOP_SET_DIRECT_IO’?
                 if (ioctl(fd, LOOP_SET_BLOCK_SIZE, (unsigned long) c->block_size) < 0)
                               ^~~~~~~~~~~~~~~~~~~
                               LOOP_SET_DIRECT_IO

Fixes: https://github.com/systemd/systemd/issues/33341

Signed-off-by: Raphaël Mélotte <raphael.melotte@mind.be>
src/basic/missing_loop.h