From 464ba863e7d6489a06951d899cef46acae82867b Mon Sep 17 00:00:00 2001 From: Orgad Shaneh Date: Wed, 24 May 2017 15:31:23 +0300 Subject: [PATCH] Fix compilation with MinGW32 --- execute.c | 2 +- util.c | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) 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); -- 2.47.2