Build fails on master on ubuntu 22.04 error: conflicting types for ‘close_range’; have ‘int(unsigned int, unsigned int, unsigned int)
To reproduce
Steps to reproduce the behavior:
- Clone the repo to the latest master : hash at time of the bug is 35ade3c8
- Build on Ubuntu using the provided cmake readme file
Expected result
Build passes
Actual result
Build fails with error
/home/abdelah/workspace/dbus/dbus/dbus-sysdeps-unix.c:154:1: error: conflicting types for ‘close_range’; have ‘int(unsigned int, unsigned int, unsigned int)’
154 | close_range (unsigned int first,
| ^~~~~~~~~~~
In file included from /usr/include/x86_64-linux-gnu/bits/sigstksz.h:24,
from /usr/include/signal.h:328,
from /home/abdelah/workspace/dbus/dbus/dbus-sysdeps-unix.c:46:
/usr/include/unistd.h:1208:12: note: previous declaration of ‘close_range’ with type ‘int(unsigned int, unsigned int, int)’
1208 | extern int close_range (unsigned int __fd, unsigned int __max_fd,
| ^~~~~~~~~~~
make[2]: *** [dbus/CMakeFiles/dbus-1.dir/build.make:706: dbus/CMakeFiles/dbus-1.dir/dbus-sysdeps-unix.c.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:377: dbus/CMakeFiles/dbus-1.dir/all] Error 2
make: *** [Makefile:166: all] Error 2