]> git.ipfire.org Git - thirdparty/snapper.git/commitdiff
- compile with older glibc
authorArvin Schnell <aschnell@suse.de>
Thu, 30 Aug 2012 15:53:17 +0000 (17:53 +0200)
committerArvin Schnell <aschnell@suse.de>
Thu, 30 Aug 2012 15:53:17 +0000 (17:53 +0200)
snapper/Filesystem.cc

index e3a03dfe2738edd948aec68d775456edc4c43d90..e9338b667108bf15755db8fa196bd1c9fe2f017e 100644 (file)
@@ -127,7 +127,11 @@ namespace snapper
            return false;
        }
 
+#ifdef UMOUNT_NOFOLLOW
        int r2 = umount2(mount_point.c_str(), UMOUNT_NOFOLLOW);
+#else
+       int r2 = umount2(mount_point.c_str(), 0);
+#endif
        if (r2 != 0)
        {
            y2err("umount failed errno:" << errno << " (" << stringerror(errno) << ")");
@@ -725,8 +729,12 @@ namespace snapper
     {
        {
            // TODO looks like a bug that this is needed (with ext4)
+#if __GLIBC__ > 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 14)
            SDir subvolume_dir = openSubvolumeDir();
            syncfs(subvolume_dir.fd());
+#else
+           sync();
+#endif
        }
 
        SystemCmd cmd(LVCREATE " --snapshot --name " + quote(snapshotLvName(num)) + " " +