summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorjoerg@mysql.com <>2005-03-04 10:22:50 +0100
committerjoerg@mysql.com <>2005-03-04 10:22:50 +0100
commit631aac9d0043532454d166dcc178c846aa7dbda7 (patch)
tree86883e4f9bfeaa5bb1d9afc6b2e15e07e2d7eadd /include
parentd68db573e6090bdf006f29a4e619e382e016ec85 (diff)
downloadmariadb-git-631aac9d0043532454d166dcc178c846aa7dbda7.tar.gz
Prevent a collision with the system's '#define errno ...' by guarding the variable declaration.
Diffstat (limited to 'include')
-rw-r--r--include/my_sys.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/include/my_sys.h b/include/my_sys.h
index 0fdb8d640e7..d6104a6a3a9 100644
--- a/include/my_sys.h
+++ b/include/my_sys.h
@@ -193,11 +193,13 @@ void __CDECL hfree(void *ptr);
#endif
#endif /* MSDOS */
+#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 const char ** NEAR my_errmsg[];
extern char NEAR errbuff[NRERRBUFFS][ERRMSGSIZE];
extern char *home_dir; /* Home directory for user */