diff options
author | joerg <joerg@pkgsrc.org> | 2008-02-07 16:24:01 +0000 |
---|---|---|
committer | joerg <joerg@pkgsrc.org> | 2008-02-07 16:24:01 +0000 |
commit | 037ab467ac600631fbcb68719dc43b028ba6e245 (patch) | |
tree | 27797209b054566386f43f208601af569382ac9e /net/libfetch/files/http.c | |
parent | d85b9063b38c555a75d3806e15b781a367bfa4f8 (diff) | |
download | pkgsrc-037ab467ac600631fbcb68719dc43b028ba6e245.tar.gz |
EAUTH and ENEEDAUTH might not exist, so use them conditionally.
To flag HTTP authentication errors, fallback to EPERM.
Diffstat (limited to 'net/libfetch/files/http.c')
-rw-r--r-- | net/libfetch/files/http.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/net/libfetch/files/http.c b/net/libfetch/files/http.c index 451d284bfc8..875ee9280d2 100644 --- a/net/libfetch/files/http.c +++ b/net/libfetch/files/http.c @@ -1,4 +1,4 @@ -/* $NetBSD: http.c,v 1.2 2008/02/07 16:14:44 joerg Exp $ */ +/* $NetBSD: http.c,v 1.3 2008/02/07 16:24:01 joerg Exp $ */ /*- * Copyright (c) 2000-2004 Dag-Erling Coïdan Smørgrav * All rights reserved. @@ -712,7 +712,11 @@ http_connect(struct url *URL, struct url *purl, const char *flags) fetch_ssl(conn, verbose) == -1) { fetch_close(conn); /* grrr */ +#ifdef EAUTH errno = EAUTH; +#else + errno = EPERM; +#endif fetch_syserr(); return (NULL); } |