aboutsummaryrefslogtreecommitdiff
path: root/toys
diff options
context:
space:
mode:
authorRob Landley <rob@landley.net>2020-01-30 22:04:43 -0600
committerRob Landley <rob@landley.net>2020-01-30 22:04:43 -0600
commit2b729ee1e0cb266bf50df0ca80f123f93384ac77 (patch)
treebd457cb0d65e7eab57bdc70050656eefb9047b1c /toys
parent0f7eb7f2dec9deeef02ed7d36e547f6bd1a14c4d (diff)
downloadtoybox-2b729ee1e0cb266bf50df0ca80f123f93384ac77.tar.gz
Move TOYBOX_VERSION fallback definition to toys.h.
(A git build takes it from "git describe".)
Diffstat (limited to 'toys')
-rw-r--r--toys/pending/wget.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/toys/pending/wget.c b/toys/pending/wget.c
index 405ed942..16672a24 100644
--- a/toys/pending/wget.c
+++ b/toys/pending/wget.c
@@ -135,7 +135,7 @@ void wget_main(void)
FILE *fp;
ssize_t len, body_len;
char *body, *result, *rc, *r_str, *redir_loc = 0;
- char ua[18] = "toybox wget", ver[6], hostname[1024], port[6], path[1024];
+ char ua[18] = "toybox wget", hostname[1024], port[6], path[1024];
// TODO extract filename to be saved from URL
if (!(toys.optflags & FLAG_O)) help_exit("no filename");
@@ -145,9 +145,7 @@ void wget_main(void)
get_info(toys.optargs[0], hostname, port, path);
-#ifdef TOYBOX_VERSION
- strcat(ua, "/"), strncpy(ver, TOYBOX_VERSION, 5), strcat(ua, ver);
-#endif
+ sprintf("/%s", TOYBOX_VERSION);
for (;; redirects--) {
sock = conn_svr(hostname, port);
// compose HTTP request