kernel-packages team mailing list archive
-
kernel-packages team
-
Mailing list archive
-
Message #142168
[Bug 1509894] [NEW] Cannot include "netinet/in.h" with "linux/netfilter/nf_nat.h" and "sys/capability.h"
Public bug reported:
I expect to be able to compile the following program (and indeed I am
able to compile it on Ubuntu release before 15.10):
```
// test.c
#include "sys/capability.h"
#include "netinet/in.h"
#include "linux/netfilter/nf_nat.h"
int main() {
// Program that needs to call capset() and htonl(), and also needs
// to do some netfilter things with NF_ACCEPT...
}
```
However, on 15.10 I get a bunch of errors:
```
$ gcc test.c
In file included from test.c:3:0:
/usr/include/linux/in.h:28:3: error: redeclaration of enumerator ‘IPPROTO_IP’
IPPROTO_IP = 0, /* Dummy protocol for TCP */
^
/usr/include/netinet/in.h:42:5: note: previous definition of ‘IPPROTO_IP’ was here
IPPROTO_IP = 0, /* Dummy protocol for TCP. */
^
...
```
This bug breaks the build for Sandstorm on Ubuntu 15.10:
https://github.com/sandstorm-io/sandstorm/issues/1049
```
$ lsb_release -rd
Description: Ubuntu 15.10
Release: 15.10
$ apt-cache policy linux-libc-dev
linux-libc-dev:
Installed: 4.2.0-16.19
Candidate: 4.2.0-16.19
Version table:
*** 4.2.0-16.19 0
500 http://us.archive.ubuntu.com/ubuntu/ wily/main amd64 Packages
100 /var/lib/dpkg/status
```
** Affects: linux (Ubuntu)
Importance: Undecided
Status: New
--
You received this bug notification because you are a member of Kernel
Packages, which is subscribed to linux in Ubuntu.
https://bugs.launchpad.net/bugs/1509894
Title:
Cannot include "netinet/in.h" with "linux/netfilter/nf_nat.h" and
"sys/capability.h"
Status in linux package in Ubuntu:
New
Bug description:
I expect to be able to compile the following program (and indeed I am
able to compile it on Ubuntu release before 15.10):
```
// test.c
#include "sys/capability.h"
#include "netinet/in.h"
#include "linux/netfilter/nf_nat.h"
int main() {
// Program that needs to call capset() and htonl(), and also needs
// to do some netfilter things with NF_ACCEPT...
}
```
However, on 15.10 I get a bunch of errors:
```
$ gcc test.c
In file included from test.c:3:0:
/usr/include/linux/in.h:28:3: error: redeclaration of enumerator ‘IPPROTO_IP’
IPPROTO_IP = 0, /* Dummy protocol for TCP */
^
/usr/include/netinet/in.h:42:5: note: previous definition of ‘IPPROTO_IP’ was here
IPPROTO_IP = 0, /* Dummy protocol for TCP. */
^
...
```
This bug breaks the build for Sandstorm on Ubuntu 15.10:
https://github.com/sandstorm-io/sandstorm/issues/1049
```
$ lsb_release -rd
Description: Ubuntu 15.10
Release: 15.10
$ apt-cache policy linux-libc-dev
linux-libc-dev:
Installed: 4.2.0-16.19
Candidate: 4.2.0-16.19
Version table:
*** 4.2.0-16.19 0
500 http://us.archive.ubuntu.com/ubuntu/ wily/main amd64 Packages
100 /var/lib/dpkg/status
```
To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1509894/+subscriptions
Follow ups
-
[Bug 1509894] Re: Cannot include "netinet/in.h" with "linux/netfilter/nf_nat.h" and "sys/capability.h"
From: Alberto Salvia Novella, 2015-12-11
-
[Bug 1509894] Re: Cannot include "netinet/in.h" with "linux/netfilter/nf_nat.h" and "sys/capability.h"
From: David Renshaw, 2015-10-28
-
[Bug 1509894] Re: Cannot include "netinet/in.h" with "linux/netfilter/nf_nat.h" and "sys/capability.h"
From: David Renshaw, 2015-10-28
-
[Bug 1509894] WifiSyslog.txt
From: David Renshaw, 2015-10-26
-
[Bug 1509894] UdevDb.txt
From: David Renshaw, 2015-10-26
-
[Bug 1509894] ProcModules.txt
From: David Renshaw, 2015-10-26
-
[Bug 1509894] ProcInterrupts.txt
From: David Renshaw, 2015-10-26
-
[Bug 1509894] ProcCpuinfo.txt
From: David Renshaw, 2015-10-26
-
[Bug 1509894] PciMultimedia.txt
From: David Renshaw, 2015-10-26
-
[Bug 1509894] Lspci.txt
From: David Renshaw, 2015-10-26
-
[Bug 1509894] JournalErrors.txt
From: David Renshaw, 2015-10-26
-
[Bug 1509894] CurrentDmesg.txt
From: David Renshaw, 2015-10-26
-
[Bug 1509894] Card0.Codecs.codec97.0.ac97.0.0.regs.txt
From: David Renshaw, 2015-10-26
-
[Bug 1509894] Card0.Codecs.codec97.0.ac97.0.0.txt
From: David Renshaw, 2015-10-26
-
[Bug 1509894] CRDA.txt
From: David Renshaw, 2015-10-26
-
[Bug 1509894] Re: Cannot include "netinet/in.h" with "linux/netfilter/nf_nat.h" and "sys/capability.h"
From: David Renshaw, 2015-10-26
-
[Bug 1509894] Missing required logs.
From: Brad Figg, 2015-10-26