From: Orgad Shaneh Date: Wed, 24 May 2017 12:31:23 +0000 (+0300) Subject: Fix compilation with MinGW32 X-Git-Tag: v3.4~48 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=464ba863e7d6489a06951d899cef46acae82867b;p=thirdparty%2Fccache.git Fix compilation with MinGW32 --- diff --git a/execute.c b/execute.c index 566ef9e82..a5020d958 100644 --- a/execute.c +++ b/execute.c @@ -190,7 +190,7 @@ win32execute(char *path, char **argv, int doreturn, * sizeof(TCHAR)); _snprintf((LPTSTR) lpDisplayBuf, LocalSize(lpDisplayBuf) / sizeof(TCHAR), - TEXT("%s failed with error %d: %s"), __FILE__, dw, lpMsgBuf); + TEXT("%s failed with error %ld: %s"), __FILE__, dw, (const char *)lpMsgBuf); cc_log("can't execute %s; OS returned error: %s", full_path_win_ext, (char *)lpDisplayBuf); diff --git a/util.c b/util.c index a951d7ea6..21785fe78 100644 --- a/util.c +++ b/util.c @@ -548,8 +548,8 @@ get_hostname(void) * sizeof(TCHAR)); _snprintf((LPTSTR) lp_display_buf, LocalSize(lp_display_buf) / sizeof(TCHAR), - TEXT("%s failed with error %d: %s"), __FILE__, dw, - lp_msg_buf); + TEXT("%s failed with error %ld: %s"), __FILE__, dw, + (const char *)lp_msg_buf); cc_log("can't get hostname OS returned error: %s", (char *)lp_display_buf); @@ -1458,7 +1458,7 @@ x_rename(const char *oldpath, const char *newpath) * sizeof(TCHAR)); _snprintf((LPTSTR) lp_display_buf, LocalSize(lp_display_buf) / sizeof(TCHAR), - TEXT("%s failed with error %d: %s"), __FILE__, dw, lp_msg_buf); + TEXT("%s failed with error %ld: %s"), __FILE__, dw, (const char *)lp_msg_buf); cc_log("can't rename file %s to %s OS returned error: %s", oldpath, newpath, (char *) lp_display_buf);