From 74db51884619a4135ba74a2e6647dd62d1c760b4 Mon Sep 17 00:00:00 2001
From: Oliver Schmidt
Date: Sun, 14 Jun 2015 17:48:36 +0200
Subject: [PATCH] Set Win32 file i/o to binary mode.
This is i.e. necessary to have the file based webserver-example successfully read 'contiki.gif'.
---
platform/win32/contiki-main.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/platform/win32/contiki-main.c b/platform/win32/contiki-main.c
index 5ced80992..0472bfbcc 100644
--- a/platform/win32/contiki-main.c
+++ b/platform/win32/contiki-main.c
@@ -36,6 +36,7 @@
#include
#include
#include
+#include
#include "contiki-net.h"
@@ -101,6 +102,8 @@ char **contiki_argv;
int
main(int argc, char **argv)
{
+ _set_fmode(O_BINARY);
+
contiki_argc = argc;
contiki_argv = argv;