Hi, The libgnomevfs/xdgmimemagic.c and modules/fstype.c files in gnome-vfs include errno.h to get the declaration of the errno variable. This is correct. However, they also hardcode an extern declaration, 'extern int errno', which is against the ISO C standard and makes the build of those files break, at least, under Dragonfly BSD (because that line conflicts with the one in errno.h). (ISO C90 said that errno is a macro while C99 says that it is an lvalue.) The solution is trivial: get rid of the extern int errno lines from the code. Note that this does not introduce regressions because many other source files in gnome-vfs are already using the errno variable based solely on the errno.h header. See the attached patch. I'm submitting this here for review, but this is simply a copy of the contents of bug #336382. Cheers, -- Julio M. Merino Vidal <jmmv84 gmail com> The Julipedia - http://julipedia.blogspot.com/
Attachment:
patch.diff
Description: Binary data