Skip to content
Snippets Groups Projects
Commit 687df5c8 authored by Daniel Stenberg's avatar Daniel Stenberg
Browse files

sethostname: provide local prototype for gethostname

This is only to avoid warnings on some systems.
parent 40253e32
No related branches found
No related tags found
No related merge requests found
......@@ -17,8 +17,10 @@
*
* 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
* 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)
{
const char *force_hostname = getenv(GETHOSTNAME_ENV_VAR);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment