Code
struct sockaddr_in ser;
...
#line 68
fprintf(stderr, "Can't find host %s\n", inet_ntoa(ser.sin_addr));
Compile (gcc …) warning
68: warning: format '%s' expects type 'char *', but argument 3 has type 'int'
but “inet_ntoa()” does should return “char *”, right?
By default, functions which are used without an active prototype return an
int. This behaviour is specified in the ISO C standard (at least in C90).You need to include the header file where that function is declared so that the compiler has the right prototype for it.