summaryrefslogtreecommitdiff
path: root/ext/Fcntl
diff options
context:
space:
mode:
Diffstat (limited to 'ext/Fcntl')
-rw-r--r--ext/Fcntl/Fcntl.xs6
1 files changed, 6 insertions, 0 deletions
diff --git a/ext/Fcntl/Fcntl.xs b/ext/Fcntl/Fcntl.xs
index 18a175f1c6..5149444b68 100644
--- a/ext/Fcntl/Fcntl.xs
+++ b/ext/Fcntl/Fcntl.xs
@@ -5,7 +5,13 @@
#ifdef VMS
# include <file.h>
#else
+#if defined(__GNUC__) && defined(__cplusplus) && defined(WIN32)
+#define _NO_OLDNAMES
+#endif
# include <fcntl.h>
+#if defined(__GNUC__) && defined(__cplusplus) && defined(WIN32)
+#undef _NO_OLDNAMES
+#endif
#endif
/* This comment is a kludge to get metaconfig to see the symbols