luv-Add-missing-definitions-for-MinGW.patch 538 B

12345678910111213141516171819202122232425
  1. diff --git a/src/dns.c b/src/dns.c
  2. index 8634157..5f36625 100644
  3. --- a/src/dns.c
  4. +++ b/src/dns.c
  5. @@ -20,6 +20,19 @@
  6. #include <sys/types.h>
  7. #include <sys/socket.h>
  8. #include <netdb.h>
  9. +#elif __MINGW32__
  10. +# ifndef AI_NUMERICSERV
  11. +# define AI_NUMERICSERV 0x0008
  12. +# endif
  13. +# ifndef AI_ALL
  14. +# define AI_ALL 0x00000100
  15. +# endif
  16. +# ifndef AI_ADDRCONFIG
  17. +# define AI_ADDRCONFIG 0x00000400
  18. +# endif
  19. +# ifndef AI_V4MAPPED
  20. +# define AI_V4MAPPED 0x00000800
  21. +# endif
  22. #endif
  23. static void luv_pushaddrinfo(lua_State* L, struct addrinfo* res) {