-
Bug
-
Resolution: Unresolved
-
Major
-
rhel-10.0.beta
-
None
-
None
-
rhel-sst-pt-libraries
-
ssg_platform_tools
-
2
-
False
-
-
No
-
None
-
None
-
None
-
Unspecified Release Note Type - Unknown
-
-
Unspecified
-
None
What were you trying to do that didn't work?
When compiling a reproducer test case, there are compilation errors on RHEL10: redefinition of: 'struct flock', 'struct flock64', and 'struct f_owner_ex'
The same test case compiles successfully on RHEL-9.5 with kernel 5.14.0-480.el9. and gcc version 11.4.1 20231218.
Please provide the package NVR for which bug is seen:
- uname -r
6.10.0-15.el10.x86_64
Every time.
Steps to reproduce
I cut down test case to just a few lines and tried to run 'gcc -o test test.c'
#define _GNU_SOURCE
#include <linux/watch_queue.h>
#include <sys/mount.h>
int main()
{ return 0; }Expected results
Successful compilation
Actual results
In file included from /usr/include/fcntl.h:35, from /usr/include/sys/mount.h:24, from test.c:3: /usr/include/bits/fcntl.h:35:8: error: redefinition of 'struct flock' 35 | struct flock | ^~~~~ In file included from /usr/include/asm/fcntl.h:1, from /usr/include/linux/fcntl.h:5, from /usr/include/linux/watch_queue.h:6, from test.c:2: /usr/include/asm-generic/fcntl.h:195:8: note: originally defined here 195 | struct flock { | ^~~~~ /usr/include/bits/fcntl.h:50:8: error: redefinition of 'struct flock64' 50 | struct flock64 | ^~~~~~~ /usr/include/asm-generic/fcntl.h:209:8: note: originally defined here 209 | struct flock64 { | ^~~~~~~ /usr/include/bits/fcntl-linux.h:267:5: error: expected identifier before numeric constant 267 | F_OWNER_TID = 0, /* Kernel thread. */ | ^~~~~~~~~~~ In file included from /usr/include/bits/fcntl.h:61: /usr/include/bits/fcntl-linux.h:274:8: error: redefinition of 'struct f_owner_ex' 274 | struct f_owner_ex | ^~~~~~~~~~ /usr/include/asm-generic/fcntl.h:155:8: note: originally defined here 155 | struct f_owner_ex { | ^~~~~~~~~~