summaryrefslogtreecommitdiff
path: root/perlio.c
diff options
context:
space:
mode:
Diffstat (limited to 'perlio.c')
-rw-r--r--perlio.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/perlio.c b/perlio.c
index 999b5fb19f..b59737c669 100644
--- a/perlio.c
+++ b/perlio.c
@@ -187,6 +187,9 @@ PerlIO_fdupopen(pTHX_ PerlIO *f, CLONE_PARAMS *param, int flags)
if (fd >= 0) {
char mode[8];
int omode = fcntl(fd, F_GETFL);
+#ifdef DJGPP
+ omode = djgpp_get_stream_mode(f);
+#endif
PerlIO_intmode2str(omode,mode,NULL);
/* the r+ is a hack */
return PerlIO_fdopen(fd, mode);