Skip to content

Instantly share code, notes, and snippets.

@mala
Created April 23, 2010 03:37
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mala/376149 to your computer and use it in GitHub Desktop.
Save mala/376149 to your computer and use it in GitHub Desktop.
--- ares_init.c.old 2010-04-23 11:46:56.000000000 +0900
+++ ares_init.c 2010-04-23 12:19:06.000000000 +0900
@@ -831,12 +831,16 @@
FILE *fp;
size_t linesize;
int error;
+ const char *path_resolv_conf = getenv("ARES_PATH_RESOLV_CONF");
+ if (!path_resolv_conf) {
+ path_resolv_conf = PATH_RESOLV_CONF;
+ }
/* Don't read resolv.conf and friends if we don't have to */
if (ARES_CONFIG_CHECK(channel))
return ARES_SUCCESS;
- fp = fopen(PATH_RESOLV_CONF, "r");
+ fp = fopen(path_resolv_conf, "r");
if (fp) {
while ((status = ares__read_line(fp, &line, &linesize)) == ARES_SUCCESS)
{
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment