Skip to content

Commit

Permalink
Patched to compile on 64-bit Mac OS X.
Browse files Browse the repository at this point in the history
  • Loading branch information
icculus committed Feb 28, 2010
1 parent a3b0a90 commit 11e166f
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions platform_unix.c
Expand Up @@ -468,7 +468,7 @@ char *MojoPlatform_osType(void)
char *MojoPlatform_osVersion()
{
#if PLATFORM_MACOSX
long ver, major, minor, patch;
SInt32 ver, major, minor, patch;
boolean convert = false;
char *buf = NULL;
char dummy = 0;
Expand Down Expand Up @@ -500,9 +500,10 @@ char *MojoPlatform_osVersion()
patch = (ver & 0xF);
} /* if */

len = snprintf(&dummy, sizeof (dummy), "%ld.%ld.%ld", major, minor, patch);
len = snprintf(&dummy, sizeof (dummy), "%d.%d.%d",
(int) major, (int) minor, (int) patch);
buf = (char *) xmalloc(len+1);
snprintf(buf, len+1, "%ld.%ld.%ld", major, minor, patch);
snprintf(buf, len+1, "%d.%d.%d", (int) major, (int) minor, (int) patch);
return buf;

#else
Expand Down

0 comments on commit 11e166f

Please sign in to comment.