Mercurial > hg > xemacs-beta
comparison lib-src/gnuserv.c @ 440:8de8e3f6228a r21-2-28
Import from CVS: tag r21-2-28
author | cvs |
---|---|
date | Mon, 13 Aug 2007 11:33:38 +0200 |
parents | 3ecd8885ac67 |
children | abe6d1db359e |
comparison
equal
deleted
inserted
replaced
439:357dd071b03c | 440:8de8e3f6228a |
---|---|
697 size_t addrlen = sizeof(struct sockaddr_in); | 697 size_t addrlen = sizeof(struct sockaddr_in); |
698 struct sockaddr_in peer; /* for peer socket address */ | 698 struct sockaddr_in peer; /* for peer socket address */ |
699 | 699 |
700 memset((char *)&peer,0,sizeof(struct sockaddr_in)); | 700 memset((char *)&peer,0,sizeof(struct sockaddr_in)); |
701 | 701 |
702 if ((s = accept(ls,(struct sockaddr *)&peer, (void *) &addrlen)) == -1) | 702 if ((s = accept(ls,(struct sockaddr *)&peer, &addrlen)) == -1) |
703 { | 703 { |
704 perror(progname); | 704 perror(progname); |
705 fprintf(stderr,"%s: unable to accept\n",progname); | 705 fprintf(stderr,"%s: unable to accept\n",progname); |
706 exit(1); | 706 exit(1); |
707 } /* if */ | 707 } /* if */ |
817 size_t len = sizeof(struct sockaddr_un); | 817 size_t len = sizeof(struct sockaddr_un); |
818 struct sockaddr_un server; /* for unix socket address */ | 818 struct sockaddr_un server; /* for unix socket address */ |
819 | 819 |
820 server.sun_family = AF_UNIX; | 820 server.sun_family = AF_UNIX; |
821 | 821 |
822 if ((s = accept(ls,(struct sockaddr *)&server, (void *)&len)) < 0) | 822 if ((s = accept(ls,(struct sockaddr *)&server, &len)) < 0) |
823 { | 823 { |
824 perror(progname); | 824 perror(progname); |
825 fprintf(stderr,"%s: unable to accept\n",progname); | 825 fprintf(stderr,"%s: unable to accept\n",progname); |
826 } /* if */ | 826 } /* if */ |
827 | 827 |