From: Raphaël Mélotte Date: Fri, 14 Jun 2024 12:37:29 +0000 (+0200) Subject: src/basic/missing_loop.h: fix missing LOOP_SET_BLOCK_SIZE X-Git-Tag: v257-rc1~1149 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=56ab1c54497d9fac74380ff9e11aaf931a917d2b;p=thirdparty%2Fsystemd.git 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 --- diff --git a/src/basic/missing_loop.h b/src/basic/missing_loop.h index b88501d78b3..f83a14c9149 100644 --- a/src/basic/missing_loop.h +++ b/src/basic/missing_loop.h @@ -29,3 +29,7 @@ assert_cc(LOOP_SET_DIRECT_IO == 0x4C08); #ifndef LOOP_SET_STATUS_SETTABLE_FLAGS # define LOOP_SET_STATUS_SETTABLE_FLAGS (LO_FLAGS_AUTOCLEAR | LO_FLAGS_PARTSCAN) #endif + +#ifndef LOOP_SET_BLOCK_SIZE +# define LOOP_SET_BLOCK_SIZE 0x4C09 +#endif