]> git.ipfire.org Git - thirdparty/bacula.git/commitdiff
Fix append/immutable compilation problem for Windows
authorMichal Rakowski <michal.rakowski@baculasystems.com>
Wed, 13 Oct 2021 16:59:41 +0000 (18:59 +0200)
committerEric Bollengier <eric@baculasystems.com>
Thu, 14 Sep 2023 11:56:56 +0000 (13:56 +0200)
bacula/src/stored/file_dev.c

index d547bbdcf74f33154e2116a2cde3780f89df56e7..e6d5b6ec07cf254278f96b2f81fe00a72106c153 100644 (file)
@@ -594,6 +594,7 @@ bool file_dev::check_volume_protection_time(const char *vol_name)
    return true;
 }
 
+#ifdef HAVE_FS_IOC_GETFLAGS
 bool file_dev::check_for_attr(const char *vol_name, int attr)
 {
    int tmp_fd, ioctl_ret, get_attr;
@@ -628,7 +629,14 @@ bool file_dev::check_for_attr(const char *vol_name, int attr)
 
    return ret;
 }
+#else
+bool file_dev::check_for_attr(const char *vol_name, int attr)
+{
+   return true;
+}
+#endif // HAVE_FS_IOC_GETFLAGS
 
+#ifdef HAVE_FS_IOC_SETFLAGS
 bool file_dev::modify_fattr(const char *vol_name, int attr, bool set)
 {
    bool ret = false;
@@ -692,6 +700,12 @@ bail_out:
    }
    return ret;
 }
+#else
+bool file_dev::modify_fattr(const char *vol_name, int attr, bool set)
+{
+   return true;
+}
+#endif // HAVE_FS_IOC_SETFLAGS
 
 bool file_dev::set_fattr(const char *vol_name, int attr)
 {