mirror of
https://github.com/curl/curl.git
synced 2025-09-14 08:02:44 +03:00
sethostname: provide local prototype for gethostname
This is only to avoid warnings on some systems.
This commit is contained in:
parent
40253e32fe
commit
687df5c8c3
|
@ -17,8 +17,10 @@
|
||||||
*
|
*
|
||||||
* Since some systems think this prototype doesn't match the system provided
|
* Since some systems think this prototype doesn't match the system provided
|
||||||
* function, we AVOID including unistd.h or other headers that may include the
|
* function, we AVOID including unistd.h or other headers that may include the
|
||||||
* original prototype!
|
* original prototype! We provide our own instead (to avoid warnings).
|
||||||
*/
|
*/
|
||||||
|
int gethostname(char *name, size_t namelen);
|
||||||
|
|
||||||
int gethostname(char *name, size_t namelen)
|
int gethostname(char *name, size_t namelen)
|
||||||
{
|
{
|
||||||
const char *force_hostname = getenv(GETHOSTNAME_ENV_VAR);
|
const char *force_hostname = getenv(GETHOSTNAME_ENV_VAR);
|
||||||
|
|
Loading…
Reference in New Issue
Block a user