[Commits] [SCM] claws branch, master, updated. 3.14.1-198-gbbeb55d

mones at claws-mail.org mones at claws-mail.org
Thu Feb 16 22:57:46 CET 2017


The branch, master has been updated
       via  bbeb55d2ede594a176feceb60c1a5ed6eb627bd4 (commit)
      from  8f2c1491f848e3f5419bf0f93a07ebd4e08b6d61 (commit)

Summary of changes:
 src/common/socket.c |    8 +++++---
 src/common/socket.h |    5 ++---
 2 files changed, 7 insertions(+), 6 deletions(-)


- Log -----------------------------------------------------------------
commit bbeb55d2ede594a176feceb60c1a5ed6eb627bd4
Author: Ricardo Mones <ricardo at mones.org>
Date:   Thu Feb 16 22:57:37 2017 +0100

    Do not hardcode resolv.conf location

diff --git a/src/common/socket.c b/src/common/socket.c
index 2fc18b1..b363f76 100644
--- a/src/common/socket.c
+++ b/src/common/socket.c
@@ -1,6 +1,6 @@
 /*
  * Claws Mail -- a GTK+ based, lightweight, and fast e-mail client
- * Copyright (C) 1999-2015 Hiroyuki Yamamoto and the Claws Mail team
+ * Copyright (C) 1999-2017 Hiroyuki Yamamoto and the Claws Mail team
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
@@ -14,7 +14,6 @@
  *
  * You should have received a copy of the GNU General Public License
  * along with this program. If not, see <http://www.gnu.org/licenses/>.
- *
  */
 
 #ifdef HAVE_CONFIG_H
@@ -49,6 +48,9 @@
 #  include <netinet/in.h>
 #  include <arpa/inet.h>
 #  include <resolv.h>
+#  ifndef _PATH_RESCONF
+#    define _PATH_RESCONF "/etc/resolv.conf"
+#  endif
 #  include <netdb.h>
 #endif /* G_OS_WIN32 */
 #include <unistd.h>
@@ -221,7 +223,7 @@ void refresh_resolvers(void)
 	 * know if it'd work on BSDs.
 	 * Why doesn't the glibc do it by itself?
 	 */
-	if (g_stat("/etc/resolv.conf", &s) == 0) {
+	if (g_stat(_PATH_RESCONF, &s) == 0) {
 		if (s.st_mtime > resolv_conf_changed) {
 			resolv_conf_changed = s.st_mtime;
 			res_init();
diff --git a/src/common/socket.h b/src/common/socket.h
index dc4c5b9..2c78066 100644
--- a/src/common/socket.h
+++ b/src/common/socket.h
@@ -1,6 +1,6 @@
 /*
- * Sylpheed -- a GTK+ based, lightweight, and fast e-mail client
- * Copyright (C) 1999-2012 Hiroyuki Yamamoto and the Claws Mail team
+ * Claws Mail -- a GTK+ based, lightweight, and fast e-mail client
+ * Copyright (C) 1999-2017 Hiroyuki Yamamoto and the Claws Mail team
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
@@ -14,7 +14,6 @@
  *
  * You should have received a copy of the GNU General Public License
  * along with this program. If not, see <http://www.gnu.org/licenses/>.
- * 
  */
 
 #ifndef __SOCKET_H__

-----------------------------------------------------------------------


hooks/post-receive
-- 
Claws Mail


More information about the Commits mailing list