From edb9b3abc03c0a0f84b1cbd9cf5920e3c84e5c18 Mon Sep 17 00:00:00 2001 From: Richard Jones Date: Fri, 20 Nov 2009 10:38:07 +0000 Subject: daemon/Win32: make some functions and fields optional. inotify: Make this optional on platforms that don't have this interface. mknod, mkfifo etc.: Make these optional on non-Unix platforms. readdir: If d_type field is missing on the platform, set the corresponding field to 'u'. stat: st_blocks and st_blksize are missing on non-Unix platforms, so set these fields to -1 in the corresponding structures. --- daemon/mknod.c | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'daemon/mknod.c') diff --git a/daemon/mknod.c b/daemon/mknod.c index adaeb80e..6ff88efa 100644 --- a/daemon/mknod.c +++ b/daemon/mknod.c @@ -33,6 +33,7 @@ int do_mknod (int mode, int devmajor, int devminor, const char *path) { +#ifdef HAVE_MKNOD int r; CHROOT_IN; @@ -45,6 +46,10 @@ do_mknod (int mode, int devmajor, int devminor, const char *path) } return 0; +#else + reply_with_error ("%s is not available", __func__); + return -1; +#endif } int -- cgit