summaryrefslogtreecommitdiff
path: root/package/elftoaout
diff options
context:
space:
mode:
authorWaldemar Brodkorb <wbx@uclibc-ng.org>2016-09-16 14:51:01 +0200
committerWaldemar Brodkorb <wbx@uclibc-ng.org>2016-09-16 14:51:01 +0200
commit781a0cf37456a5b7b4d0d9106ef3401a9936b842 (patch)
treea5dc513823acbc900590fa4a05885fbb1887c478 /package/elftoaout
parente95992acc7fbe25c21bacb82ba7ab38bc75f7646 (diff)
elftoaout: fix on Darwin
Diffstat (limited to 'package/elftoaout')
-rw-r--r--package/elftoaout/Makefile4
-rw-r--r--package/elftoaout/src/elftoaout.c2
2 files changed, 5 insertions, 1 deletions
diff --git a/package/elftoaout/Makefile b/package/elftoaout/Makefile
index 9f374e31d..51af97ee8 100644
--- a/package/elftoaout/Makefile
+++ b/package/elftoaout/Makefile
@@ -20,6 +20,10 @@ $(eval $(call HOST_template,ELFTOAOUT,elftoaout,$(PKG_VERSION)-$(PKG_RELEASE)))
HOST_STYLE:= manual
+ifeq ($(OS_FOR_BUILD),Darwin)
+HOST_CFLAGS+= -I$(ADK_TOPDIR)/adk/include
+endif
+
host-build:
$(HOST_CC) $(HOST_CFLAGS) -o $(WRKBUILD)/elftoaout $(WRKBUILD)/elftoaout.c
diff --git a/package/elftoaout/src/elftoaout.c b/package/elftoaout/src/elftoaout.c
index 943c9ef34..60260b9b2 100644
--- a/package/elftoaout/src/elftoaout.c
+++ b/package/elftoaout/src/elftoaout.c
@@ -24,7 +24,7 @@
#include <linux/elf.h>
#define ELFDATA2MSB 2
#else
-#include <sys/elf.h>
+#include <elf.h>
#endif
#define swab16(x) (((x)<<8&0xFF00)|((x)>>8&0x00FF))