Build: ifdef guard for EXPERIMENTAL_QUEUEFILE
[users/heiko/exim.git] / src / src / transports / queuefile.c
index 4339d1fdd0773efe9bbfd2d5a4f6749d48d721f1..e657e350fbc62d0fdce3c0f0ecc8e3905e0c4977 100644 (file)
@@ -4,13 +4,20 @@
 
 /* Copyright (c) Andrew Colin Kissa <andrew@topdog.za.net> 2016 */
 /* Copyright (c) University of Cambridge 2016 */
-/* Copyright (c) The Exim Maintainers 1995 - 2018 */
+/* Copyright (c) The Exim Maintainers 1995 - 2020 */
 /* See the file NOTICE for conditions of use and distribution. */
 
 
+
 #include "../exim.h"
+
+#ifdef EXPERIMENTAL_QUEUEFILE  /* whole file */
 #include "queuefile.h"
 
+#ifndef EXIM_HAVE_OPENAT
+# error queuefile transport reqires openat() support
+#endif
+
 /* Options specific to the appendfile transport. They must be in alphabetic
 order (note that "_" comes before the lower case letters). Some of them are
 stored in the publicly visible instance block - these are flagged with the
@@ -18,7 +25,7 @@ opt_public flag. */
 
 optionlist queuefile_transport_options[] = {
   { "directory", opt_stringptr,
-    (void *)offsetof(queuefile_transport_options_block, dirname) },
+    OPT_OFF(queuefile_transport_options_block, dirname) },
 };
 
 
@@ -276,3 +283,4 @@ return FALSE;
 }
 
 #endif /*!MACRO_PREDEF*/
+#endif /*EXPERIMENTAL_QUEUEFILE*/