diff --git a/lib/connect.c b/lib/connect.c
index 4ab7af2bd5bf46fdfae1ef17d1279cb613dd623c..8799ba2dfd07ce104a48c58bc1e1bccab388d635 100644
--- a/lib/connect.c
+++ b/lib/connect.c
@@ -143,6 +143,7 @@ int Curl_nonblock(curl_socket_t sockfd,    /* operate on this */
     return fcntl(sockfd, F_SETFL, flags | O_NONBLOCK);
   else
     return fcntl(sockfd, F_SETFL, flags & (~O_NONBLOCK));
+#undef SETBLOCK
 #define SETBLOCK 1
 #endif