]> git.ipfire.org Git - thirdparty/systemd.git/commit
partition: fix build with newer linux/btrfs.h uapi header 26195/head
authorFrantisek Sumsal <frantisek@sumsal.cz>
Wed, 25 Jan 2023 12:21:09 +0000 (13:21 +0100)
committerFrantisek Sumsal <frantisek@sumsal.cz>
Wed, 25 Jan 2023 13:27:18 +0000 (14:27 +0100)
commited614f17fc9f3876b2178db949df42a2605f6895
tree15a436289b555f61887b247d3e81dea6d3b06f96
parenta95ff98ec40edad2825c824a186f44454120cf1f
partition: fix build with newer linux/btrfs.h uapi header

linux/btrfs.h needs  to be included after sys/mount.h, as since [0]
linux/btrfs.h includes linux/fs.h causing build errors:

```
In file included from /usr/include/linux/fs.h:19,
                 from ../src/basic/linux/btrfs.h:29,
                 from ../src/partition/growfs.c:6:
/usr/include/sys/mount.h:35:3: error: expected identifier before numeric constant
   35 |   MS_RDONLY = 1,                /* Mount read-only.  */
      |   ^~~~~~~~~
[1222/2169] Compiling C object systemd-creds.p/src_creds_creds.c.o
ninja: build stopped: subcommand failed.
```

See: https://github.com/systemd/systemd/issues/8507

[0] https://github.com/torvalds/linux/commit/a28135303a669917002f569aecebd5758263e4aa
src/partition/growfs.c