Sophie

Sophie

distrib > Mageia > 5 > x86_64 > by-pkgid > 3531dcc31ae075d4d4c28a91a67ec65b > files > 19

mariadb-10.0.29-1.3.mga5.src.rpm

"extern int errno" is just a really bad idea.


diff -Naurp mariadb-10.0.7/include/my_sys.h mariadb-10.0.7.oden/include/my_sys.h
--- mariadb-10.0.7/include/my_sys.h	2013-12-23 10:35:05.000000000 +0100
+++ mariadb-10.0.7.oden/include/my_sys.h	2014-02-04 16:34:36.392328175 +0100
@@ -209,13 +209,8 @@ extern void my_large_free(uchar *ptr);
 #define my_safe_afree(ptr, size, max_alloca_sz) my_afree(ptr)
 #endif /* HAVE_ALLOCA */
 
-#ifndef errno				/* did we already get it? */
-#ifdef HAVE_ERRNO_AS_DEFINE
 #include <errno.h>			/* errno is a define */
-#else
-extern int errno;			/* declare errno */
-#endif
-#endif					/* #ifndef errno */
+
 extern char *home_dir;			/* Home directory for user */
 extern MYSQL_PLUGIN_IMPORT char  *mysql_data_home;
 extern const char *my_progname;		/* program-name (printed in errors) */