uclient-fetch: define _GNU_SOURCE (used for asprintf)
[project/uclient.git] / uclient-fetch.c
index 733a5b9..881b4ea 100644 (file)
@@ -16,6 +16,7 @@
  * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
  */
 
+#define _GNU_SOURCE
 #include <unistd.h>
 #include <stdio.h>
 #include <dlfcn.h>
@@ -145,7 +146,7 @@ static void msg_connecting(struct uclient *cl)
                return;
 
        uclient_get_addr(addr, &port, &cl->remote_addr);
-       fprintf(stderr, "Connecting to %s %s:%d\n", cl->url->host, addr, port);
+       fprintf(stderr, "Connecting to %s:%d\n", addr, port);
 }
 
 static void init_request(struct uclient *cl)
@@ -327,6 +328,9 @@ int main(int argc, char **argv)
                        auth_str = username;
        }
 
+       if (!quiet)
+               fprintf(stderr, "Downloading '%s'\n", argv[0]);
+
        cl = uclient_new(argv[0], auth_str, &cb);
        if (!cl) {
                fprintf(stderr, "Failed to allocate uclient context\n");