Fix httping compilation
[openwrt/svn-archive/archive.git] / net / httping / patches / 02-version.patch
1 diff -urN httping-1.0.10/main.c httping-1.0.10.new/main.c
2 --- httping-1.0.10/main.c 2006-01-02 17:07:29.000000000 +0100
3 +++ httping-1.0.10.new/main.c 2007-02-27 11:14:32.000000000 +0100
4 @@ -38,6 +38,8 @@
5 #include "utils.h"
6 #include "error.h"
7
8 +#define VERSION "1.0.10"
9 +
10 static volatile int stop = 0;
11
12 int quiet = 0;
13 @@ -48,7 +50,7 @@
14
15 void version(void)
16 {
17 - fprintf(stderr, "HTTPing v" VERSION ", (C) 2003-2005 folkert@vanheusden.com\n");
18 + fprintf(stderr, "HTTPing v%s (C) 2003-2005 folkert@vanheusden.com\n", VERSION);
19 #ifndef NO_SSL
20 fprintf(stderr, "SSL support included\n");
21 #endif
22 @@ -382,7 +384,7 @@
23 if (useragent)
24 sprintf(&request[strlen(request)], "User-Agent: %s\r\n", useragent);
25 else
26 - sprintf(&request[strlen(request)], "User-Agent: HTTPing v" VERSION "\r\n");
27 + sprintf(&request[strlen(request)], "User-Agent: HTTPing v%s\r\n", VERSION);
28 if (referer)
29 sprintf(&request[strlen(request)], "Referer: %s\r\n", referer);
30 strcat(request, "\r\n");