example: fix strdup() for MSVC compiles

MSVC has a _strdup() that we better use. This was reported in bug
This commit is contained in:
Daniel Stenberg 2010-06-07 13:35:30 +02:00
parent eeeebd02e7
commit 4e10882e06

View File

@ -32,6 +32,11 @@
#include <arpa/inet.h>
#endif
#if defined(_WIN32) && !defined(__GNUC__)
/* plain MSVC setups have no normal strdup */
#define strdup _strdup
#endif
#include <sys/types.h>
#include <fcntl.h>
#include <errno.h>