From: Jay Freeman (saurik) Date: Sun, 1 Nov 2009 03:23:23 +0000 (+0000) Subject: Attempted to port back to Linux. X-Git-Tag: v0.9.432~206 X-Git-Url: https://git.saurik.com/cycript.git/commitdiff_plain/272a0dd43f5dca04b637d04f71df8e34a0c76aae?ds=sidebyside Attempted to port back to Linux. --- diff --git a/Library.cpp b/Library.cpp index a6e9e4e..e1ef4fa 100644 --- a/Library.cpp +++ b/Library.cpp @@ -1021,7 +1021,7 @@ static void Struct_getPropertyNames(JSContextRef context, JSObjectRef object, JS name = elements[index].name; if (name == NULL) { - sprintf(number, "%lu", index); + sprintf(number, "%zu", index); name = number; } diff --git a/cycript.hpp b/cycript.hpp index cc64033..a1e1f02 100644 --- a/cycript.hpp +++ b/cycript.hpp @@ -40,7 +40,11 @@ #ifndef CYCRIPT_HPP #define CYCRIPT_HPP +#ifdef __APPLE__ #include +#else +#include +#endif #include #include diff --git a/sig/parse.cpp b/sig/parse.cpp index 05b3213..0a1d26f 100644 --- a/sig/parse.cpp +++ b/sig/parse.cpp @@ -271,7 +271,7 @@ const char *Unparse(apr_pool_t *pool, struct Type *type) { case array_P: { const char *value = Unparse(pool, type->data.data.type); - return apr_psprintf(pool, "[%lu%s]", type->data.data.size, value); + return apr_psprintf(pool, "[%zu%s]", type->data.data.size, value); } break; case pointer_P: return apr_psprintf(pool, "^%s", type->data.data.type == NULL ? "v" : Unparse(pool, type->data.data.type));