1 /*****************************************************************************
3 * Project ___| | | | _ \| |
5 * | (__| |_| | _ <| |___
6 * \___|\___/|_| \_\_____|
12 #include "sethostname.h"
15 * we force our own host name, in order to make some tests machine independent
18 int gethostname(char *name, GETHOSTNAME_TYPE_ARG2 namelen)
20 const char *force_hostname = getenv("CURL_GETHOSTNAME");
22 strncpy(name, force_hostname, namelen);
23 name[namelen-1] = '\0';
27 /* LD_PRELOAD used, but no hostname set, we'll just return a failure */