The header files fcntl.h and linux/fcntl.h are incompatible
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
glibc (Ubuntu) |
Confirmed
|
Undecided
|
Unassigned | ||
linux (Ubuntu) |
Confirmed
|
Undecided
|
Unassigned |
Bug Description
The program try.c, below, does not compile.
Though with HAVE_ARCH_
But then fails again to compile, when _GNU_SOURCE is also defined.
I expect this to compile in all three cases.
$ cat try.c
//#define _GNU_SOURCE
//#define HAVE_ARCH_
//#define HAVE_ARCH_
#include <fcntl.h>
#include <linux/fcntl.h>
int main(int argc, char *argv[]){}
$ gcc try.c
In file included from /usr/include/
/usr/include/
struct flock {
^~~~~
In file included from /usr/include/
/usr/include/
struct flock
^~~~~
$ gcc -DHAVE_
$ gcc -D_GNU_SOURCE -DHAVE_
In file included from /usr/include/
/usr/include/
struct f_owner_ex {
^~~~~~~~~~
In file included from /usr/include/
/usr/include/
struct f_owner_ex
^~~~~~~~~~
$ gcc --version | head -1
gcc (Ubuntu 7.2.0-8ubuntu3) 7.2.0
$ lsb_release -rd
Description: Ubuntu 17.10
Release: 17.10
$ dpkg -S /usr/include/
libc6-dev:amd64: /usr/include/
# Package: libc6-dev
# Version: 2.26-0ubuntu2
$ dpkg -S /usr/include/
linux-libc-
# Package: linux-libc-dev
# Version: 4.13.0-19.22
Regards, Mike
Changed in linux (Ubuntu): | |
status: | Confirmed → New |
Thank you for taking the time to report this bug and helping to make Ubuntu better. It seems that your bug report is not filed about a specific source package though, rather it is just filed against Ubuntu in general. It is important that bug reports be filed about source packages so that people interested in the package can find the bugs about it. You can find some hints about determining what package your bug might be about at https:/ /wiki.ubuntu. com/Bugs/ FindRightPackag e. You might also ask for help in the #ubuntu-bugs irc channel on Freenode.
To change the source package that this bug is filed about visit https:/ /bugs.launchpad .net/ubuntu/ +bug/1739300/ +editstatus and add the package name in the text box next to the word Package.
[This is an automated message. I apologize if it reached you inappropriately; please just reply to this message indicating so.]