daemon/Win32: Use gnulib modules for first porting to Win32.
[libguestfs.git] / daemon / daemon.h
index 1cdb480..120c86c 100644 (file)
@@ -19,6 +19,7 @@
 #ifndef GUESTFSD_DAEMON_H
 #define GUESTFSD_DAEMON_H
 
+#include <stdio.h>
 #include <stdarg.h>
 #include <errno.h>
 #include <unistd.h>
@@ -184,7 +185,7 @@ extern void reply (xdrproc_t xdrp, char *ret);
  */
 #define REQUIRE_ROOT_OR_RESOLVE_DEVICE(path,fail_stmt)                 \
   do {                                                                 \
-    if (strncmp ((path), "/dev/", 5) == 0)                             \
+    if (STREQLEN ((path), "/dev/", 5))                         \
       RESOLVE_DEVICE ((path), fail_stmt);                              \
     else {                                                             \
       NEED_ROOT (fail_stmt);                                           \