https://bugs.winehq.org/show_bug.cgi?id=52250
--- Comment #3 from Marcos GutiƩrrez Batz sacrom@gmail.com --- Looking further, the second error was not libcurl checking the definition (sorry!). It's due to the first part of the winsock.h, the one in the __WINE_WINSOCKAPI_STDLIB_H "section".
So the solution can be:
#define _WINSOCKAPI_ #define __WINE_WINSOCKAPI_STDLIB_H
Maybe the #ifdef __WINE_WINSOCKAPI_STDLIB_H "section" could be moved inside the _WINSOCKAPI_ one, so to just have the first define...
Anyway, with this two defines is working, but I think the previous solution was neater (not so "hacky").
So I leave the bug open for you to close if you think it is not worth the effort.