From 62dc65e0e42398dd7ad7f7105d4c725f0e8a9745 Mon Sep 17 00:00:00 2001 From: Vasily Litvinov Date: Mon, 1 Sep 2014 02:35:06 +0400 Subject: [PATCH] Fixed missing __BEGIN_DECLS / __END_DECLS on MinGW --- makefile | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/makefile b/makefile index ea51d66f73..653e906650 100755 --- a/makefile +++ b/makefile @@ -243,6 +243,12 @@ ifneq ($(android),) ifeq ($(platform),macosx) android-cflags += -Doff64_t=off_t -Dlseek64=lseek endif + # on Windows (in MinGW-based build) there are neither __BEGIN_DECLS nor __END_DECLS + # defines; we don't want to patch every file that uses them, so we stub them in + # using CFLAGS mechanism + ifeq ($(platform),windows) + android-cflags += "-D__BEGIN_DECLS=extern \"C\" {" "-D__END_DECLS=}" + endif luni-cpps := $(shell find $(luni-native) -name '*.cpp')