openbsd-ports/net/kismet/patches/patch-gpsmap_cc

41 lines
1.7 KiB
Plaintext

$OpenBSD: patch-gpsmap_cc,v 1.4 2007/06/28 12:43:32 kili Exp $
# Use our ftp(1) instead of wget.
# Unbreak on 64bit archs (and just simplify).
--- gpsmap.cc.orig Sat May 20 21:41:16 2006
+++ gpsmap.cc Mon Jun 25 13:36:14 2007
@@ -99,8 +99,8 @@ const char url_template_em[] = "gpsmap-helper-earthama
const char url_template_euex[] = "http://www.expedia.de/pub/agent.dll?qscr=mrdt&ID=3XNsF.&CenP=%f,%f&Lang=%s&Alti=%ld&Size=%d,%d&Offs=0.000000,0.000000&BCheck=1";
-// Download template for sources that we fetch using wget
-const char download_template[] = "wget \"%s\" -O %s";
+// Download template for sources that we fetch using ftp
+const char download_template[] = "/usr/bin/ftp -o %s \"%s\"";
// Image scales we try to autofetch
long int scales[] = { 1000, 2000, 5000, 10000, 20000, 30000, 50000, 60000,
@@ -2242,11 +2242,8 @@ void DrawNetPower(vector<gps_network *> in_nets, Image
pthread_attr_destroy(&attr);
// Now wait for the threads to complete and come back
- int thread_status;
for (int t = 0; t < numthreads; t++) {
- void *tmp;
- pthread_join(mapthread[t], &tmp);
- thread_status = reinterpret_cast<int>(tmp);
+ pthread_join(mapthread[t], NULL);
}
#else
// Run one instance of our "thread". thread number 0, it should just crunch it all
@@ -4219,7 +4216,7 @@ int main(int argc, char *argv[]) {
}
} else {
char geturl[1024];
- snprintf(geturl, 1024, download_template, url, mapname);
+ snprintf(geturl, 1024, download_template, mapname, url);
if (system(geturl)!=0) {
fprintf(stderr, "WARNING: failed to execute '%s'\n", geturl);
exit(1);