summaryrefslogtreecommitdiffstats
path: root/avahi-daemon
diff options
context:
space:
mode:
authorSebastien Estienne <sebastien.estienne@gmail.com>2005-07-06 15:46:31 +0000
committerSebastien Estienne <sebastien.estienne@gmail.com>2005-07-06 15:46:31 +0000
commitaaa1c563f5f89f3f1e333a031cf71056fdc50e5e (patch)
tree0b45986a7f132b665f9a948c632d65995614e0b0 /avahi-daemon
parentaaf4c3e431d767ee628758abdc99f82b3af66b8f (diff)
* cleaned configure.ac
* fix Avahi runtime dir * use AM_CFLAGS instead of config.h.in to define paths (interfaces, socket, pid) git-svn-id: file:///home/lennart/svn/public/avahi/trunk@165 941a03a8-eaeb-0310-b9a0-b1bbd8fe43fe
Diffstat (limited to 'avahi-daemon')
-rw-r--r--avahi-daemon/Makefile.am2
-rw-r--r--avahi-daemon/main.c12
2 files changed, 8 insertions, 6 deletions
diff --git a/avahi-daemon/Makefile.am b/avahi-daemon/Makefile.am
index 3762ba5..2f09490 100644
--- a/avahi-daemon/Makefile.am
+++ b/avahi-daemon/Makefile.am
@@ -22,6 +22,8 @@ servicedir=$(pkgsysconfdir)/services
AM_CFLAGS= \
-I$(top_srcdir) \
+ -DAVAHI_DAEMON_RUNTIME_DIR=\"$(avahi_runtime_dir)/avahi-daemon/\" \
+ -DAVAHI_SOCKET=\"$(avahi_socket)\" \
-DAVAHI_SERVICE_DIRECTORY=\"$(servicedir)\" \
-DAVAHI_CONFIG_FILE=\"$(pkgsysconfdir)/avahi.conf\"
diff --git a/avahi-daemon/main.c b/avahi-daemon/main.c
index ce82664..ab17a9c 100644
--- a/avahi-daemon/main.c
+++ b/avahi-daemon/main.c
@@ -625,7 +625,7 @@ static gint drop_root(void) {
}
static const char* pid_file_proc(void) {
- return AVAHI_RUNTIME_DIR"/avahi-daemon.pid";
+ return AVAHI_DAEMON_RUNTIME_DIR"/pid";
}
static gint make_runtime_dir(void) {
@@ -649,20 +649,20 @@ static gint make_runtime_dir(void) {
u = umask(0000);
reset_umask = TRUE;
- if (mkdir(AVAHI_RUNTIME_DIR, 0755) < 0 && errno != EEXIST) {
- avahi_log_error("mkdir(\""AVAHI_RUNTIME_DIR"\"): %s", strerror(errno));
+ if (mkdir(AVAHI_DAEMON_RUNTIME_DIR, 0755) < 0 && errno != EEXIST) {
+ avahi_log_error("mkdir(\""AVAHI_DAEMON_RUNTIME_DIR"\"): %s", strerror(errno));
goto fail;
}
- chown(AVAHI_RUNTIME_DIR, pw->pw_uid, gr->gr_gid);
+ chown(AVAHI_DAEMON_RUNTIME_DIR, pw->pw_uid, gr->gr_gid);
- if (stat(AVAHI_RUNTIME_DIR, &st) < 0) {
+ if (stat(AVAHI_DAEMON_RUNTIME_DIR, &st) < 0) {
avahi_log_error("stat(): %s\n", strerror(errno));
goto fail;
}
if (!S_ISDIR(st.st_mode) || st.st_uid != pw->pw_uid || st.st_gid != gr->gr_gid) {
- avahi_log_error("Failed to create runtime directory "AVAHI_RUNTIME_DIR".");
+ avahi_log_error("Failed to create runtime directory "AVAHI_DAEMON_RUNTIME_DIR".");
goto fail;
}