summaryrefslogtreecommitdiff
path: root/extra/mariabackup/xbstream_read.c
diff options
context:
space:
mode:
Diffstat (limited to 'extra/mariabackup/xbstream_read.c')
-rw-r--r--extra/mariabackup/xbstream_read.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/extra/mariabackup/xbstream_read.c b/extra/mariabackup/xbstream_read.c
index 0ffcabd9270..f8d88926ec2 100644
--- a/extra/mariabackup/xbstream_read.c
+++ b/extra/mariabackup/xbstream_read.c
@@ -48,13 +48,13 @@ xb_stream_read_new(void)
stream->buffer = my_malloc(INIT_BUFFER_LEN, MYF(MY_FAE));
stream->buflen = INIT_BUFFER_LEN;
- stream->fd = fileno(stdin);
- stream->offset = 0;
-
#ifdef __WIN__
- setmode(stream->fd, _O_BINARY);
+ setmode(fileno(stdin), _O_BINARY);
#endif
+ stream->fd = my_fileno(stdin);
+ stream->offset = 0;
+
return stream;
}