]> arthur.barton.de Git - netatalk.git/blobdiff - etc/afpd/afp_dsi.c
Spotlight: use async Tracker SPARQL API
[netatalk.git] / etc / afpd / afp_dsi.c
index eb7f796e19ca366fb09f7d8b2dfd15ad443e34af..98404ce20f588c849faba4c66cb02dc5b5db211a 100644 (file)
@@ -28,6 +28,8 @@
 #include <arpa/inet.h>
 #include <setjmp.h>
 #include <time.h>
+#include <sys/types.h>
+#include <sys/wait.h>
 
 #include <atalk/logger.h>
 #include <atalk/dsi.h>
@@ -337,7 +339,7 @@ static void alarm_handler(int sig _U_)
     }
 }
 
-static void child_handler(void)
+static void child_handler(int sig _U_)
 {
     wait(NULL);
 }
@@ -491,9 +493,12 @@ void afp_over_dsi(AFPObj *obj)
     int flag = 1;
     setsockopt(dsi->socket, SOL_TCP, TCP_NODELAY, &flag, sizeof(flag));
 
+#ifdef HAVE_TRACKER
     /* Initialize Spotlight */
-    if ((obj->options.flags & OPTION_SPOTLIGHT) && (obj->options.slmod_path))
-        sl_mod_load(obj);
+    if (obj->options.flags & OPTION_SPOTLIGHT) {
+        spotlight_init(obj);
+    }
+#endif
 
     ipc_child_state(obj, DSI_RUNNING);