summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ext/stringio/stringio.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/ext/stringio/stringio.c b/ext/stringio/stringio.c
index 916b64e0b6..a7cdfc2bce 100644
--- a/ext/stringio/stringio.c
+++ b/ext/stringio/stringio.c
@@ -14,6 +14,11 @@
#include "ruby.h"
#include "rubyio.h"
+#if defined(HAVE_FCNTL_H) || defined(_WIN32)
+#include <fcntl.h>
+#elif defined(HAVE_SYS_FCNTL_H)
+#include <sys/fcntl.h>
+#endif
#define STRIO_EOF FMODE_SYNC