Perhaps you can do this by adding -include errno.hto the command line, which creates the appropriate library. Here is a brief example. I have a C program called "file.c":
#define ESRCH 8
What is it - then I will compile with:
cc -c -include errno.h file.c
And presto, compiler warning:
file.c:1:1: warning: "ESRCH" redefined
In file included from /usr/include/errno.h:23,
from <command-line>:0:
/usr/include/sys/errno.h:84:1: warning: this is the location of the previous definition
This will tell you where your bad definitions are.
source
share