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')