summaryrefslogtreecommitdiffstats
path: root/elf.c
diff options
context:
space:
mode:
Diffstat (limited to 'elf.c')
-rw-r--r--elf.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/elf.c b/elf.c
index f0240dc..96db266 100644
--- a/elf.c
+++ b/elf.c
@@ -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);