GNOME Bugzilla – Bug 336382
errno declarations break the build
Last modified: 2006-04-25 09:46:13 UTC
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.
Created attachment 62232 [details] [review] Sample patch.
Thanks for your bug report! Maybe you could submit your patch to the gnome-vfs mailing list [1] for review? [1] http://mail.gnome.org/mailman/listinfo/gnome-vfs-list
Commiting, thanks!