summaryrefslogtreecommitdiffstats
path: root/lib/libfetch/http.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/libfetch/http.c')
-rw-r--r--lib/libfetch/http.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/lib/libfetch/http.c b/lib/libfetch/http.c
index eed12f2..8d040d0 100644
--- a/lib/libfetch/http.c
+++ b/lib/libfetch/http.c
@@ -80,8 +80,6 @@ __FBSDID("$FreeBSD$");
#include "common.h"
#include "httperr.h"
-extern char *__progname; /* XXX not portable */
-
/* Maximum number of redirects to follow */
#define MAX_REDIRECT 5
@@ -840,7 +838,7 @@ _http_request(struct url *URL, const char *op, struct url_stat *us,
if ((p = getenv("HTTP_USER_AGENT")) != NULL && *p != '\0')
_http_cmd(fd, "User-Agent: %s", p);
else
- _http_cmd(fd, "User-Agent: %s " _LIBFETCH_VER, __progname);
+ _http_cmd(fd, "User-Agent: %s " _LIBFETCH_VER, _getprogname());
if (url->offset)
_http_cmd(fd, "Range: bytes=%lld-", (long long)url->offset);
_http_cmd(fd, "Connection: close");
OpenPOWER on IntegriCloud