diff -Naur nano-2.8.0/config.guess.orig nano-2.8.0/config.guess
--- nano-2.8.0/config.guess.orig	2016-09-09 01:06:00.000000000 -0400
+++ nano-2.8.0/config.guess	2017-04-09 01:22:34.067167300 -0400
@@ -883,6 +883,9 @@ EOF
     amd64:CYGWIN*:*:* | x86_64:CYGWIN*:*:*)
 	echo x86_64-unknown-cygwin
 	exit ;;
+    amd64:MSYS*:*:* | x86_64:MSYS*:*:*)
+	echo x86_64-unknown-msys
+	exit ;;
     prep*:SunOS:5.*:*)
 	echo powerpcle-unknown-solaris2"`echo "$UNAME_RELEASE"|sed -e 's/[^.]*//'`"
 	exit ;;
diff -Naur nano-2.8.0/config.rpath.orig nano-2.8.0/config.rpath
--- nano-2.8.0/config.rpath.orig	2017-04-08 18:50:34.621811900 -0400
+++ nano-2.8.0/config.rpath	2017-04-08 20:10:26.717665200 -0400
@@ -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
@@ -537,7 +537,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 -Naurp nano-2.8.0/syntax/cmake.nanorc.orig nano-2.8.0/syntax/cmake.nanorc
--- nano-2.8.0/syntax/cmake.nanorc.orig	2017-03-20 09:55:38.000000000 -0400
+++ nano-2.8.0/syntax/cmake.nanorc	2017-04-09 01:22:34.085172900 -0400
@@ -13,7 +13,7 @@ color brightgreen "[[:space:]]\<(OR|AND|
 icolor brightred "^[[:space:]]*((end)?(function|macro)|return)"
 
 icolor cyan start="\$(ENV)?\{" end="\}"
-color magenta "\<(APPLE|UNIX|WIN32|CYGWIN|BORLAND|MINGW|MSVC(_IDE|60|71|80|90)?)\>"
+color magenta "\<(APPLE|UNIX|WIN32|CYGWIN|MSYS|BORLAND|MINGW|MSVC(_IDE|60|71|80|90)?)\>"
 
 color brightblue "(^|[[:space:]])#.*"
 color ,green "[[:space:]]+$"
