Skip to content

Commit 947f686

Browse files
committed
Allow to cross-compile exe2coff
Patch from Pali <pali@pali.im>.
1 parent 6b58b64 commit 947f686

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

src/stub/exe2coff.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,12 @@
55
#include <fcntl.h>
66
#include <sys/stat.h>
77
#include <string.h>
8-
#include <io.h>
98
#include <unistd.h>
109
#include <ctype.h>
1110

11+
#ifndef O_BINARY
12+
#define O_BINARY 0
13+
#endif
1214

1315
static void
1416
exe2aout(char *fname)

src/stub/makefile

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ all :: native \
2222
native :: \
2323
$(HOSTBIN)/stubedit.exe \
2424
$(HOSTBIN)/stubify.exe \
25+
$(HOSTBIN)/exe2coff.exe \
2526
$(INC)/stubinfo.h \
2627
$E
2728
$(NOP)
@@ -68,6 +69,9 @@ $(HOSTBIN)/stubify.exe : stubify.c stub.h
6869
$(HOSTBIN)/stubedit.exe : stubedit.c $(INC)/stubinfo.h
6970
$(GCC) stubedit.c -o $@
7071

72+
$(HOSTBIN)/exe2coff.exe : exe2coff.c
73+
$(GCC) exe2coff.c -o $@
74+
7175
./stub2inc.exe : stub2inc.c
7276
$(GCC) stub2inc.c -o $@
7377

0 commit comments

Comments
 (0)