#include <errno.h>
to pick up the correct definition of errno -- it's a macro now instead of a simple integer. The macro definition (you can look it up if you like) is such that
extern int errno;
is harmless. If you're patched up then you _can_ compile on older versions of RH with "extern int errno" instead of the #include and your program will run on RH9 with only a warning. That same program wouldn 't run on an RH9 freshly installed from the original CDs.
I guess I ought to add that the C definition (both C99 and the older ANSI C) said that you should include errno.h instead of using extern int errno as implementations may re-define errno to be a macro ... and now RH9 is enforcing that good practice.
jch
Carlos Villegas wrote:
Hi,
I have a small program I've been using in Psyche without problems, now when running it on Shrike it says that it needs to be recompiled because it uses errno, the exact error message is:
Incorrectly built binary which accesses errno, h_errno or _res directly. Needs to be fixed.
The program runs, but it doesn't seem to behave as expected. So
I tried to recompile it, and it won't link, all the objects seem to compile
fine, but when linking I get the following error:
undefined reference to `errno'
Any ideas on this?
Carlos
-- Shrike-list mailing list Shrike-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/shrike-list