summaryrefslogtreecommitdiffstats
path: root/libstdc++-v3/libio/libioP.h
diff options
context:
space:
mode:
Diffstat (limited to 'libstdc++-v3/libio/libioP.h')
-rw-r--r--libstdc++-v3/libio/libioP.h12
1 files changed, 8 insertions, 4 deletions
diff --git a/libstdc++-v3/libio/libioP.h b/libstdc++-v3/libio/libioP.h
index c2bf2c8205f..598949d8988 100644
--- a/libstdc++-v3/libio/libioP.h
+++ b/libstdc++-v3/libio/libioP.h
@@ -23,11 +23,7 @@
other reasons why the executable file might be covered by the GNU
General Public License. */
-#ifdef __cplusplus
-# include <cerrno>
-#else
# include <errno.h>
-#endif
#ifndef __set_errno
# define __set_errno(Val) errno = (Val)
@@ -620,11 +616,19 @@ extern void (*_IO_cleanup_registration_needed) __PMT ((void));
#if _G_HAVE_MMAP
+#ifdef __cplusplus
+}
+#endif
+
# include <unistd.h>
# include <fcntl.h>
# include <sys/mman.h>
# include <sys/param.h>
+#ifdef __cplusplus
+extern "C" {
+#endif
+
# if !defined(MAP_ANONYMOUS) && defined(MAP_ANON)
# define MAP_ANONYMOUS MAP_ANON
# endif
OpenPOWER on IntegriCloud