Didn't find a Gentoo bug for this yet, but it seems to have come up already in Fedora.
This is due to a conflict between linux/if.h and net/if.h. Downgrading to sys-kernel/linux-headers-4.4 allowed systemd to build for me
@toolchain: Any suggestions here?
there's on going work to make the headers play well together, but in the mean time, it's not news that you shouldn't be including both. if you're using the glibc funcs, then only use glibc headers.
I think the conflict is due to these two lines:
The latter is probably not available via glibc headers.
I have tried eliminating net/if.h and linux/if.h from the clusterfuck of headers, but neither seems to work; they define overlapping sets of data, but neither is a subset of the other.
This will probably remain broken until someone fixes this upstream in systemd, glibc, or the kernel.
Reported to systemd upstream.
I'm fairly sure systemd devs are already aware of it given that Pottering himself responded directly in the thread I linked to. That said, I'm not certain it's anything he can fix aside from submitting a patch to kernel and / or glibc. Furthermore, a systemd specific patch wouldn't fix the other packages that are also breaking.
Author: Mike Gilbert <firstname.lastname@example.org>
Date: Sat Apr 9 21:05:07 2016 -0400
sys-apps/systemd: Add workaround for if.h conflict
sys-apps/systemd/files/linux-headers-if.h.patch | 34 ++++++++++++++++++++++++++++++++++
sys-apps/systemd/systemd-229-r100.ebuild | 1 +
sys-apps/systemd/systemd-229.ebuild | 1 +