]> git.ipfire.org Git - thirdparty/ccache.git/commitdiff
Fix compilation with MinGW32
authorOrgad Shaneh <orgad.shaneh@audiocodes.com>
Wed, 24 May 2017 12:31:23 +0000 (15:31 +0300)
committerJoel Rosdahl <joel@rosdahl.net>
Thu, 11 Jan 2018 21:32:41 +0000 (22:32 +0100)
execute.c
util.c

index 566ef9e825861c94e84cbfe9078d4d85cca4a77f..a5020d958a5cc22d8a7259298ce92ebf0bd9f6b0 100644 (file)
--- 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 a951d7ea6da2fbdb1cbe5d26109f4c44dd7d0147..21785fe78d56ae7e0784abd4949bfcf41925c369 100644 (file)
--- 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);