]> git.meshlink.io Git - catta/blobdiff - avahi-daemon/static-services.c
bump version info
[catta] / avahi-daemon / static-services.c
index 129063c02e99b8630a75bf55ffe1560bbc79634a..97cc8b3e77843651d7516b686ad2e14039e25178 100644 (file)
@@ -302,6 +302,10 @@ struct xml_userdata {
     char *buf;
 };
 
+#ifndef XMLCALL
+#define XMLCALL
+#endif
+
 static void XMLCALL xml_start(void *data, const char *el, const char *attr[]) {
     struct xml_userdata *u = data;
     
@@ -648,7 +652,7 @@ static void load_file(char *n) {
     }
 }
 
-void static_service_load(void) {
+void static_service_load(int in_chroot) {
     StaticServiceGroup *g, *n;
     glob_t globbuf;
     char **p;
@@ -677,7 +681,7 @@ void static_service_load(void) {
     }
 
     memset(&globbuf, 0, sizeof(globbuf));
-    if (glob(AVAHI_SERVICE_DIR "/*.service", GLOB_ERR, NULL, &globbuf) != 0)
+    if (glob(in_chroot ? "/services/*.service" : AVAHI_SERVICE_DIR "/*.service", GLOB_ERR, NULL, &globbuf) != 0)
         avahi_log_error("Failed to read service directory.");
     else {
         for (p = globbuf.gl_pathv; *p; p++)