diff options
author | Jiri Gaisler <jiri@gaisler.se> | 2019-11-08 22:05:27 +0100 |
---|---|---|
committer | Jiri Gaisler <jiri@gaisler.se> | 2019-11-09 11:14:15 +0100 |
commit | 7a6e198454d04ac6bf5f2009b4f693696c27e5c1 (patch) | |
tree | 291c9f146e49f7b2efcf939b780d3314e9310888 /elf.c | |
parent | Remove unused variable xcpu (diff) | |
download | sis-7a6e198454d04ac6bf5f2009b4f693696c27e5c1.tar.bz2 |
Support building on MinGW-W64/MSYS22.19
* Depends on MinGW64-readline to build
Diffstat (limited to 'elf.c')
-rw-r--r-- | elf.c | 6 |
1 files changed, 5 insertions, 1 deletions
@@ -21,7 +21,11 @@ #include <stdio.h> #include <stdlib.h> #include <string.h> +#ifdef WIN32 +#include <winsock.h> +#else #include <netinet/in.h> +#endif #include <elf.h> #include <ctype.h> #include "sis.h" @@ -222,7 +226,7 @@ elf_load (char *fname, int load) FILE *fp; int res; - if ((fp = fopen (fname, "r")) == NULL) + if ((fp = fopen (fname, "rb")) == NULL) { printf ("file not found\n"); return (-1); |