# See: https://github.com/macports/macports-ports/blob/master/devel/lua-luasocket/files/patch-src-udp.c.diff

--- corelib/socket.cpp.orig	2015-12-13 19:28:25.000000000 +0800
+++ corelib/socket.cpp	2022-11-26 23:45:27.000000000 +0800
@@ -1269,7 +1269,10 @@
     snprintf(svc, sizeof(svc), "%d", port(addr));
     memset(&hints, 0, sizeof(hints));
     hints.ai_family = addr->sa_family;
-    hints.ai_flags = AI_NUMERICHOST | AI_NUMERICSERV;
+    hints.ai_flags = AI_NUMERICHOST;
+#ifdef  AI_NUMERICSERV
+    hints.ai_flags |= AI_NUMERICSERV;
+#endif
     node = NULL;
     getaddrinfo(buf, svc, &hints, &node);
     if (!node)
