diff options
| author | Paul Traina <pst@FreeBSD.org> | 1996-04-23 06:01:10 +0000 |
|---|---|---|
| committer | Paul Traina <pst@FreeBSD.org> | 1996-04-23 06:01:10 +0000 |
| commit | d9fd44dd795accda42b84129074c76367e9316b1 (patch) | |
| tree | 8525796ee9362ba09bd4af27203294c4ae815bce /usr.bin | |
| parent | 33bb8564be545e139fb43329ff65d64198713804 (diff) | |
Notes
Diffstat (limited to 'usr.bin')
| -rw-r--r-- | usr.bin/whois/Makefile | 7 | ||||
| -rw-r--r-- | usr.bin/whois/whois.c | 8 |
2 files changed, 11 insertions, 4 deletions
diff --git a/usr.bin/whois/Makefile b/usr.bin/whois/Makefile index e6ab08f11d328..3b6e7aa4a4146 100644 --- a/usr.bin/whois/Makefile +++ b/usr.bin/whois/Makefile @@ -2,4 +2,11 @@ PROG= whois +.if defined(SOCKS) +CFLAGS+=-DSOCKS +CFLAGS+=-Dconnect=Rconnect -Dgetsockname=Rgetsockname -Dlisten=Rlisten \ + -Daccept=Raccept -Drcmd=Rrcmd -Dbind=Rbind -Dselect=Rselect +LDADD+= -lsocks +.endif + .include <bsd.prog.mk> diff --git a/usr.bin/whois/whois.c b/usr.bin/whois/whois.c index 77d6c50d1664e..ca832ae75fe24 100644 --- a/usr.bin/whois/whois.c +++ b/usr.bin/whois/whois.c @@ -63,6 +63,10 @@ main(argc, argv) int s; char *host; +#ifdef SOCKS + SOCKSinit(argv[0]); +#endif + host = NICHOST; while ((ch = getopt(argc, argv, "h:")) != EOF) switch((char)ch) { @@ -93,10 +97,6 @@ main(argc, argv) } bzero((caddr_t)&sin, sizeof (sin)); sin.sin_family = hp->h_addrtype; - if (bind(s, (struct sockaddr *)&sin, sizeof(sin)) < 0) { - perror("whois: bind"); - exit(1); - } bcopy(hp->h_addr, (char *)&sin.sin_addr, hp->h_length); sp = getservbyname("whois", "tcp"); if (sp == NULL) { |
