https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=273373
Bug ID: 273373 Summary: <sys/timerfd.h> fails to build in POSIX mode due to namespace pollution Product: Base System Version: CURRENT Hardware: Any OS: Any Status: New Severity: Affects Only Me Priority: --- Component: kern Assignee: b...@freebsd.org Reporter: jbe...@freebsd.org CC: jf...@freebsd.org While timerfd_* isn't part of POSIX consumers may expect to build fine given epoll-shim, glibc, musl don't error out. Found via x11/mako. $ cat a.cc #define _XOPEN_SOURCE 700 #include <sys/timerfd.h> int main() {} $ cc a.c In file included from a.c:2: In file included from /usr/include/sys/timerfd.h:33: In file included from /usr/include/sys/proc.h:49: In file included from /usr/include/sys/filedesc.h:41: In file included from /usr/include/sys/lock.h:37: /usr/include/sys/_lock.h:36:2: error: unknown type name 'u_int' u_int lo_flags; ^ /usr/include/sys/_lock.h:37:2: error: unknown type name 'u_int' u_int lo_data; /* General class specific data. */ ^ In file included from a.c:2: In file included from /usr/include/sys/timerfd.h:33: In file included from /usr/include/sys/proc.h:49: In file included from /usr/include/sys/filedesc.h:41: /usr/include/sys/lock.h:62:2: error: unknown type name 'u_int' u_int lc_flags; ^ In file included from a.c:2: In file included from /usr/include/sys/timerfd.h:33: In file included from /usr/include/sys/proc.h:49: In file included from /usr/include/sys/filedesc.h:43: /usr/include/sys/priority.h:133:2: error: unknown type name 'u_char'; did you mean 'char'? u_char pri_class; /* Scheduling class. */ ^ /usr/include/sys/priority.h:134:2: error: unknown type name 'u_char'; did you mean 'char'? u_char pri_level; /* Normal priority level. */ ^ /usr/include/sys/priority.h:135:2: error: unknown type name 'u_char'; did you mean 'char'? u_char pri_native; /* Priority before propagation. */ ^ /usr/include/sys/priority.h:136:2: error: unknown type name 'u_char'; did you mean 'char'? u_char pri_user; /* User priority based on p_cpu and p_nice. */ ^ In file included from a.c:2: In file included from /usr/include/sys/timerfd.h:33: In file included from /usr/include/sys/proc.h:49: /usr/include/sys/filedesc.h:53:2: error: unknown type name 'u_long'; did you mean 'long'? u_long *fc_ioctls; /* per-descriptor allowed ioctls */ ^ /usr/include/sys/filedesc.h:97:2: error: unknown type name 'u_int' u_int pwd_refcount; ^ /usr/include/sys/filedesc.h:108:2: error: unknown type name 'u_int' u_int pd_refcount; ^ /usr/include/sys/filedesc.h:109:2: error: unknown type name 'u_short'; did you mean 'short'? u_short pd_cmask; /* mask for file creation */ ^ /usr/include/sys/filedesc.h:118:2: error: unknown type name 'u_long'; did you mean 'long'? NDSLOTTYPE *fd_map; /* bitmap of free fds */ ^ /usr/include/sys/filedesc.h:86:20: note: expanded from macro 'NDSLOTTYPE' #define NDSLOTTYPE u_long ^ In file included from a.c:2: In file included from /usr/include/sys/timerfd.h:33: In file included from /usr/include/sys/proc.h:55: /usr/include/sys/osd.h:40:2: error: unknown type name 'u_int' u_int osd_nslots; /* (c) */ ^ In file included from a.c:2: In file included from /usr/include/sys/timerfd.h:33: In file included from /usr/include/sys/proc.h:57: /usr/include/sys/rtprio.h:74:2: error: unknown type name 'u_short'; did you mean 'short'? u_short type; /* scheduling class */ ^ /usr/include/sys/rtprio.h:75:2: error: unknown type name 'u_short'; did you mean 'short'? u_short prio; ^ In file included from a.c:2: In file included from /usr/include/sys/timerfd.h:33: In file included from /usr/include/sys/proc.h:58: /usr/include/sys/runq.h:73:54: error: unknown type name 'u_char'; did you mean 'char'? void runq_remove_idx(struct runq *, struct thread *, u_char *); ^ In file included from a.c:2: In file included from /usr/include/sys/timerfd.h:33: In file included from /usr/include/sys/proc.h:62: /usr/include/sys/signalvar.h:54:2: error: unknown type name 'sig_t' sig_t ps_sigact[_SIG_MAXSIG]; /* Disposition of signals. */ ^ /usr/include/sys/signalvar.h:67:2: error: unknown type name 'u_int' u_int ps_refcnt; ^ In file included from a.c:2: In file included from /usr/include/sys/timerfd.h:33: In file included from /usr/include/sys/proc.h:70: /usr/include/sys/ucred.h:98:2: error: unknown type name 'u_int' u_int cr_version; /* structure layout version */ ^ fatal error: too many errors emitted, stopping now [-ferror-limit=] 20 errors generated. -- You are receiving this mail because: You are the assignee for the bug.