Sophie

Sophie

distrib > Mageia > 5 > i586 > media > core-updates-src > by-pkgid > e9ab895a8253d3d89c1b62807b277f3e > files > 18

mariadb-10.0.31-1.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) */