summaryrefslogtreecommitdiff
path: root/utils/tcctool
diff options
context:
space:
mode:
Diffstat (limited to 'utils/tcctool')
-rw-r--r--utils/tcctool/tcctool.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/utils/tcctool/tcctool.c b/utils/tcctool/tcctool.c
index 4c4ea8fedd..bda077a459 100644
--- a/utils/tcctool/tcctool.c
+++ b/utils/tcctool/tcctool.c
@@ -23,7 +23,6 @@
23 * 23 *
24 ****************************************************************************/ 24 ****************************************************************************/
25 25
26
27#include <stdio.h> 26#include <stdio.h>
28#include <inttypes.h> 27#include <inttypes.h>
29#include <usb.h> 28#include <usb.h>
@@ -37,6 +36,11 @@
37 36
38#define MAX_FIRMWARESIZE (10*1024*1024) /* Arbitrary limit (for safety) */ 37#define MAX_FIRMWARESIZE (10*1024*1024) /* Arbitrary limit (for safety) */
39 38
39/* For win32 compatibility: */
40#ifndef O_BINARY
41#define O_BINARY 0
42#endif
43
40struct device_t 44struct device_t
41{ 45{
42 char* name; 46 char* name;
@@ -281,7 +285,7 @@ int main(int argc, char* argv[])
281 } 285 }
282 286
283 printf("[INFO] Using device \"%s\"\n",devices[device].label); 287 printf("[INFO] Using device \"%s\"\n",devices[device].label);
284 fd = open(argv[3], O_RDONLY); 288 fd = open(argv[3], O_RDONLY|O_BINARY);
285 if (fd < 0) 289 if (fd < 0)
286 { 290 {
287 printf("[ERR] Could not open %s\n", argv[3]); 291 printf("[ERR] Could not open %s\n", argv[3]);