Another gcc compiler warning
Hi All,
I am having strange warnings from gcc compiler, which I don't think should come while cmpiling.
Can anyone help? The warnings are:
- warning: implicit declaration of function 'bzero'
- warning: implicit declaration of function 'inet_addr'
The code is as below:
int main(int argc, char **argv)
{
struct sockaddr_in servaddr;
char buffer[BUFLEN];
int n;
argv0 = argv[0];
if ( (sockfd=Socket(AF_INET,SOCK_STREAM,0)) < 0 )
exit(1);
bzero(&servaddr,sizeof(servaddr));
servaddr.sin_family = AF_INET;
if ( (servaddr.sin_addr.s_addr = inet_addr("131.170.24.42"))
== -1 ) {
fprintf(stderr,"%s : inet_addr failed, errno=%d\n",argv0,errno);
exit(1);
}
.......
.......
}