diff options
| author | Garance A Drosehn <gad@FreeBSD.org> | 2001-03-12 02:03:53 +0000 |
|---|---|---|
| committer | Garance A Drosehn <gad@FreeBSD.org> | 2001-03-12 02:03:53 +0000 |
| commit | affa003946fdb53ebff3ea5fd9baba463b929960 (patch) | |
| tree | f60d01b48f3c9c1a1b706393121f3b4d6776fce3 /usr.sbin | |
| parent | 6a30de0e1ca6ab5f79c70117a66c24791ea958bb (diff) | |
Notes
Diffstat (limited to 'usr.sbin')
| -rw-r--r-- | usr.sbin/lpr/lpd/lpd.c | 22 |
1 files changed, 15 insertions, 7 deletions
diff --git a/usr.sbin/lpr/lpd/lpd.c b/usr.sbin/lpr/lpd/lpd.c index a89082640cdb..729852a2acca 100644 --- a/usr.sbin/lpr/lpd/lpd.c +++ b/usr.sbin/lpr/lpd/lpd.c @@ -164,8 +164,12 @@ main(argc, argv) inet_flag++; break; case '6': +#ifdef INET6 family = PF_INET6; inet6_flag++; +#else + errx(EX_USAGE, "lpd compiled sans INET6 (IPv6 support)"); +#endif break; default: errs++; @@ -698,13 +702,6 @@ again: /*NOTREACHED*/ } -static void -usage() -{ - fprintf(stderr, "usage: lpd [-dlp] [port#]\n"); - exit(EX_USAGE); -} - /* setup server socket for specified address family */ /* if af is PF_UNSPEC more than one socket may be returned */ /* the returned list is dynamically allocated, so caller needs to free it */ @@ -787,3 +784,14 @@ socksetup(af, options) } return(socks); } + +static void +usage() +{ +#ifdef INET6 + fprintf(stderr, "usage: lpd [-dlp46] [port#]\n"); +#else + fprintf(stderr, "usage: lpd [-dlp] [port#]\n"); +#endif + exit(EX_USAGE); +} |
