#ifdef HAVE_FLOCK
# include <sys/file.h>
#endif
-#ifdef HAVE_LOCKF
-# include <unistd.h>
-#endif
#if defined(HAVE_LIBLOCKFILE)
-#include <lockfile.h>
+# include <lockfile.h>
#endif
#ifdef LOCKDIR
}
+#ifdef HAVE_FLOCK
/*
* Open and lock a file, using flock locking
*/
errno = saved_errno;
return -1;
}
-
+#endif /* HAVE_FLOCK */
/*
* Open and lock a file, using lockf locking