
IPv4 only for package-query
By: a guest on
Nov 15th, 2010 | syntax:
Diff | size: 0.75 KB | hits: 79 | expires: Never
diff -crB package-query-0.4/src/aur.c package-query-0.4-useipv4/src/aur.c
*** package-query-0.4/src/aur.c 2010-10-26 15:50:26.000000000 -0600
--- package-query-0.4-useipv4/src/aur.c 2010-11-13 17:13:04.810010959 -0700
***************
*** 449,454 ****
--- 449,456 ----
curl_free (pkg_name_encode);
res = string_new();
hand = yajl_alloc(&callbacks, &cfg, NULL, (void *) &pkg_json);
+ //This is needed to make sure that ipv4 is used, for some reason it won't fall back to that, this is a total kludge
+ curl_easy_setopt (curl, CURLOPT_IPRESOLVE, CURL_IPRESOLVE_V4);
curl_easy_setopt (curl, CURLOPT_ENCODING, "gzip");
curl_easy_setopt (curl, CURLOPT_WRITEDATA, res);
curl_easy_setopt (curl, CURLOPT_WRITEFUNCTION, curl_getdata_cb);