mariadb10.11/mariadb-errno.patch
2013-10-11 09:58:06 +02:00

21 lines
1004 B
Diff

"extern int errno" is just a really bad idea.
diff -up mariadb-5.5.33a/include/my_sys.h.p1 mariadb-5.5.33a/include/my_sys.h
--- mariadb-5.5.33a/include/my_sys.h.p1 2013-10-10 13:37:11.391507810 +0200
+++ mariadb-5.5.33a/include/my_sys.h 2013-10-10 13:37:57.395519715 +0200
@@ -190,13 +190,7 @@ extern void my_large_free(uchar *ptr);
#define my_safe_alloca(size, min_length) ((size <= min_length) ? my_alloca(size) : my_malloc(size,MYF(MY_FAE)))
#define my_safe_afree(ptr, size, min_length) ((size <= min_length) ? my_afree(ptr) : my_free(ptr))
-#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 */
+#include <errno.h> /* errno is a define */
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) */