Skip to content

Commit e9e2923

Browse files
rmelottebluca
authored andcommitted
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: systemd/systemd#33341 Signed-off-by: Raphaël Mélotte <[email protected]> (cherry picked from commit 56ab1c5) (cherry picked from commit 0730ec4) (cherry picked from commit ed087e8)
1 parent 244ca2d commit e9e2923

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/basic/missing_loop.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,3 +22,7 @@ struct loop_config {
2222
#ifndef LOOP_SET_STATUS_SETTABLE_FLAGS
2323
#define LOOP_SET_STATUS_SETTABLE_FLAGS (LO_FLAGS_AUTOCLEAR | LO_FLAGS_PARTSCAN)
2424
#endif
25+
26+
#ifndef LOOP_SET_BLOCK_SIZE
27+
# define LOOP_SET_BLOCK_SIZE 0x4C09
28+
#endif

0 commit comments

Comments
 (0)