From e39bbd70775c0dd15d4c9d3c4c6cbad19afa186b Mon Sep 17 00:00:00 2001 From: Kefu Chai Date: Sat, 9 Jun 2012 19:38:08 +0800 Subject: [PATCH] fixes for mac * per http://luajit.org/install.html, otherwise LuaJIT always fails to get desired memory chunk from mmap(2) * kill a warning of clang --- Makefile | 3 +++ pdf.c | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index bc1b6d9ce..5a8bb3fe3 100644 --- a/Makefile +++ b/Makefile @@ -53,6 +53,9 @@ ifdef EMULATE_READER -DEMULATE_READER_W=$(EMULATE_READER_W) \ -DEMULATE_READER_H=$(EMULATE_READER_H) EMU_LDFLAGS?=$(shell sdl-config --libs) + ifeq "$(shell uname -s -m)" "Darwin x86_64" + EMU_LDFLAGS += -pagezero_size 10000 -image_base 100000000 + endif else CFLAGS+= $(ARM_CFLAGS) endif diff --git a/pdf.c b/pdf.c index 4d9b086cd..0de2150d9 100644 --- a/pdf.c +++ b/pdf.c @@ -567,7 +567,7 @@ static int drawPage(lua_State *L) { } static int getCacheSize(lua_State *L) { - printf("## mupdf getCacheSize = %d\n", msize); + printf("## mupdf getCacheSize = %zu\n", msize); lua_pushnumber(L, msize); return 1; }