I'm building the GNU Coreutils with gcc. However, each attempt to build fails with gcc complaining that the code redefines a function that has already been defined.
Code:
tee.c:35: error: conflicting types for ‘tee’
/usr/include/bits/fcntl.h:254: note: previous declaration of ‘tee’ was here
I "fixed" that by changing the name of "tee" in the Coreutils source code. But then another error came up for another function:
Code:
test.c:142: error: static declaration of ‘eaccess’ follows non-static declaration
/usr/include/unistd.h:297: note: previous declaration of ‘eaccess’ was here
Why is the Coreutils code including these headers if it wants to redefine the functions? Should I be passing in some compiler switch that allows the latest definition to be used?