diff --git a/gc_heap.c b/gc_heap.c index 07b4a583..c943c9f1 100644 --- a/gc_heap.c +++ b/gc_heap.c @@ -608,7 +608,7 @@ sexp sexp_load_image (const char* filename, off_t offset, sexp_uint_t heap_free_ goto done; } if (offset > 0 && fseek(fp, offset, SEEK_SET) < 0) { - snprintf(gc_heap_err_str, ERR_STR_SIZE, "couldn't seek to image offset: %s -> %lld: %s\n", filename, offset, strerror(errno)); + snprintf(gc_heap_err_str, ERR_STR_SIZE, "couldn't seek to image offset: %s -> "PRIoff": %s\n", filename, offset, strerror(errno)); goto done; } diff --git a/include/chibi/sexp.h b/include/chibi/sexp.h index c2c22d0c..5d467460 100755 --- a/include/chibi/sexp.h +++ b/include/chibi/sexp.h @@ -256,6 +256,12 @@ typedef short sexp_int32_t; # endif #endif +#ifdef __APPLE__ +#define PRIoff "%lld" +#else +#define PRIoff "%ld" +#endif + #if SEXP_USE_LONG_PROCEDURE_ARGS typedef int sexp_proc_num_args_t; #else