diff --git a/configure.in b/configure.in
index 6f075363b5ccbf4562e784e940ebc1b6112e5ed1..6ff5cc4e51bc8757811d0525d86b4d6231d6706a 100644
--- a/configure.in
+++ b/configure.in
@@ -521,6 +521,7 @@ if test "x$POCC" != xyes ; then
 AC_TYPE_OFF_T
 AC_TYPE_PID_T
 fi
+AC_TYPE_SSIZE_T
 
 dnl keyword "volatile" check
 AC_CACHE_CHECK(volatile declaration,timidity_cv_type_volatile,
diff --git a/timidity/timidity.c b/timidity/timidity.c
index 31625914b61b7dceb2d31915fd510d0be361e9ac..66bd151ff8335a4532d92f3c14daf50ae39faccc 100644
--- a/timidity/timidity.c
+++ b/timidity/timidity.c
@@ -5122,11 +5122,7 @@ static void interesting_message(void)
 static RETSIGTYPE sigterm_exit(int sig)
 {
     char s[4];
-#if defined(__MINGW32__)
-    int dummy;
-#else
-    size_t dummy;
-#endif
+    ssize_t dummy;
 
     /* NOTE: Here, fprintf is dangerous because it is not re-enterance
      * function.  It is possible coredump if the signal is called in printf's.