diff -Naur time-1.9-orig/build-aux/config.rpath time-1.9/build-aux/config.rpath
--- time-1.9-orig/build-aux/config.rpath	2018-01-04 03:03:52.000000000 +0300
+++ time-1.9/build-aux/config.rpath	2018-07-27 11:09:54.370470600 +0300
@@ -57,7 +57,7 @@
     aix*)
       wl='-Wl,'
       ;;
-    mingw* | cygwin* | pw32* | os2* | cegcc*)
+    mingw* | cygwin* | msys* | pw32* | os2* | cegcc*)
       ;;
     hpux9* | hpux10* | hpux11*)
       wl='-Wl,'
@@ -149,7 +149,7 @@
 hardcode_minus_L=no
 
 case "$host_os" in
-  cygwin* | mingw* | pw32* | cegcc*)
+  cygwin* | msys* | mingw* | pw32* | cegcc*)
     # FIXME: the MSVC++ port hasn't been tested in a loooong time
     # When not using gcc, we currently assume that we are using
     # Microsoft Visual C++.
@@ -198,7 +198,7 @@
         ld_shlibs=no
       fi
       ;;
-    cygwin* | mingw* | pw32* | cegcc*)
+    cygwin* | msys* | mingw* | pw32* | cegcc*)
       # hardcode_libdir_flag_spec is actually meaningless, as there is
       # no search path for DLLs.
       hardcode_libdir_flag_spec='-L$libdir'
@@ -348,7 +348,7 @@
       ;;
     bsdi[45]*)
       ;;
-    cygwin* | mingw* | pw32* | cegcc*)
+    cygwin* | msys* | mingw* | pw32* | cegcc*)
       # When not using gcc, we currently assume that we are using
       # Microsoft Visual C++.
       # hardcode_libdir_flag_spec is actually meaningless, as there is
@@ -533,7 +533,7 @@
   bsdi[45]*)
     library_names_spec='$libname$shrext'
     ;;
-  cygwin* | mingw* | pw32* | cegcc*)
+  cygwin* | msys* | mingw* | pw32* | cegcc*)
     shrext=.dll
     library_names_spec='$libname.dll.a $libname.lib'
     ;;
diff -Naur time-1.9-orig/m4/double-slash-root.m4 time-1.9/m4/double-slash-root.m4
--- time-1.9-orig/m4/double-slash-root.m4	2018-01-04 03:03:53.000000000 +0300
+++ time-1.9/m4/double-slash-root.m4	2018-07-27 11:11:41.589458900 +0300
@@ -16,7 +16,7 @@
         # special semantics and is distinct from /, please report it to
         # <bug-gnulib@gnu.org>.
         case $host in
-          *-cygwin | i370-ibm-openedition)
+          *-cygwin | *-msys | i370-ibm-openedition)
             gl_cv_double_slash_root=yes ;;
           *)
             # Be optimistic and assume that / and // are the same when we
diff -Naur time-1.9-orig/m4/malloc.m4 time-1.9/m4/malloc.m4
--- time-1.9-orig/m4/malloc.m4	2018-01-04 03:03:53.000000000 +0300
+++ time-1.9/m4/malloc.m4	2018-07-27 11:11:26.863033000 +0300
@@ -33,7 +33,7 @@
        [case "$host_os" in
           # Guess yes on platforms where we know the result.
           *-gnu* | gnu* | freebsd* | netbsd* | openbsd* \
-          | hpux* | solaris* | cygwin* | mingw*)
+          | hpux* | solaris* | cygwin* | msys* | mingw*)
             ac_cv_func_malloc_0_nonnull=yes ;;
           # If we don't know, assume the worst.
           *) ac_cv_func_malloc_0_nonnull=no ;;
diff -Naur time-1.9-orig/m4/stdnoreturn.m4 time-1.9/m4/stdnoreturn.m4
--- time-1.9-orig/m4/stdnoreturn.m4	2018-01-04 03:03:53.000000000 +0300
+++ time-1.9/m4/stdnoreturn.m4	2018-07-27 11:11:52.868278700 +0300
@@ -11,7 +11,7 @@
 [
   AC_REQUIRE([AC_CANONICAL_HOST])
   case "$host_os" in
-    cygwin*)
+    cygwin* | msys*)
       dnl Regardless whether a working <stdnoreturn.h> exists or not,
       dnl we need our own <stdnoreturn.h>, because of the definition
       dnl of _Noreturn done by gnulib-common.m4.
