Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 577660 - sys-apps/systemd-229 with sys-kernel/linux-headers-4.5 error: redeclaration of enumerator ‘IFF_UP’
Summary: sys-apps/systemd-229 with sys-kernel/linux-headers-4.5 error: redeclaration o...
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Core system (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Gentoo systemd Team
Depends on:
Reported: 2016-03-17 21:49 UTC by Reuben Martin
Modified: 2016-04-10 01:06 UTC (History)
3 users (show)

See Also:
Package list:
Runtime testing required: ---


Note You need to log in before you can comment on or make changes to this bug.
Description Reuben Martin 2016-03-17 21:49:05 UTC
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

Reproducible: Always
Comment 1 Mike Gilbert gentoo-dev 2016-03-17 22:00:05 UTC
@toolchain: Any suggestions here?
Comment 2 SpanKY gentoo-dev 2016-03-18 00:56:40 UTC
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.
Comment 3 Mike Gilbert gentoo-dev 2016-03-18 02:46:39 UTC
I think the conflict is due to these two lines:

#include <sys/if.h>
#include <linux/netfilter_ipv4/ip_tables.h>

The latter is probably not available via glibc headers.
Comment 4 Mike Gilbert gentoo-dev 2016-03-18 03:04:42 UTC
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.
Comment 5 Mike Gilbert gentoo-dev 2016-03-18 03:15:41 UTC
Reported to systemd upstream.
Comment 6 Reuben Martin 2016-03-18 04:34:52 UTC
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.
Comment 7 Mike Gilbert gentoo-dev 2016-04-10 01:06:15 UTC
commit c008e237dd1dfd1139373e4e6287e95f94c60346
Author: Mike Gilbert <>
Date:   Sat Apr 9 21:05:07 2016 -0400

    sys-apps/systemd: Add workaround for if.h conflict
    Package-Manager: portage-2.2.28_p3

 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 +