Don't like ads? PRO users don't see any ads ;-)
Guest

IPv4 only for package-query

By: a guest on Nov 15th, 2010  |  syntax: Diff  |  size: 0.75 KB  |  hits: 79  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. diff -crB package-query-0.4/src/aur.c package-query-0.4-useipv4/src/aur.c
  2. *** package-query-0.4/src/aur.c 2010-10-26 15:50:26.000000000 -0600
  3. --- package-query-0.4-useipv4/src/aur.c 2010-11-13 17:13:04.810010959 -0700
  4. ***************
  5. *** 449,454 ****
  6. --- 449,456 ----
  7.                 curl_free (pkg_name_encode);
  8.                 res = string_new();
  9.         hand = yajl_alloc(&callbacks, &cfg,  NULL, (void *) &pkg_json);
  10. +               //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
  11. +               curl_easy_setopt (curl, CURLOPT_IPRESOLVE, CURL_IPRESOLVE_V4);
  12.                 curl_easy_setopt (curl, CURLOPT_ENCODING, "gzip");
  13.                 curl_easy_setopt (curl, CURLOPT_WRITEDATA, res);
  14.                 curl_easy_setopt (curl, CURLOPT_WRITEFUNCTION, curl_getdata_cb);