[systemd-devel] [patch] #include src/shared/missing.h in src/shared/util.h for missing struct file_handle definition
simon.mcvittie at collabora.co.uk
Fri Aug 1 07:53:07 PDT 2014
On 01/08/14 15:43, Samuli Suominen wrote:
> Please, #include "missing.h" in src/shared/util.h to fix the build for
> old systems w/ no system header defining
> the struct
I ran into the same thing on a slightly odd system (Debian 7 with a
backported kernel, so it has Linux 3.14 but only glibc 2.13) and
initially tried an identical patch, but it turned out to break the
build, because missing.h redefines a bunch of stuff from <linux/btrfs.h>
if HAVE_LINUX_BTRFS_H is not defined, and if you don't include config.h,
that symbol will never be defined.
The attached patch is what I'm using, and might be closer to correct,
although I think to be fully portable (e.g. to Debian 7 with its
original Linux 3.2) the inclusion of <linux/btrfs.h> might need to be
wrapped in #ifdef HAVE_LINUX_BTRFS_H too. I haven't tried that
Best-practice in Autotools projects seems to be to include config.h at
the very top of every .c file, whether it is currently needed or not.
Thanks for reminding me to upstream this!
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 1598 bytes
Desc: not available
More information about the systemd-devel