maharmstone / ntfs2btrfs

GNU General Public License v2.0
705 stars 32 forks source link

Fix compilation with GCC 14.1 #78

Closed michel-slm closed 3 months ago

michel-slm commented 3 months ago

ntfs2btrfs fails to build during the mass rebuild for Fedora 41:

In file included from /builddir/build/BUILD/ntfs2btrfs-20240115-build/ntfs2btrfs-20240115/src/ntfs.cpp:21:
/builddir/build/BUILD/ntfs2btrfs-20240115-build/ntfs2btrfs-20240115/src/ntfs.h:537:10: error: ‘unique_ptr’ in namespace ‘std’ does not name a template type
  537 |     std::unique_ptr<ntfs_file> mft;
      |          ^~~~~~~~~~
/builddir/build/BUILD/ntfs2btrfs-20240115-build/ntfs2btrfs-20240115/src/ntfs.h:31:1: note: ‘std::unique_ptr’ is defined in header ‘<memory>’; this is probably fixable by adding ‘#include <memory>’
   30 | #include <unistd.h>
  +++ |+#include <memory>
   31 | #endif

This was with GCC 14.1; previously it succeeded when built with GCC 14.0 for Fedora 40: https://koji.fedoraproject.org/koji/packageinfo?packageID=33355

Explicitly include <memory> rather than relying on it transitively.

michel-slm commented 3 months ago

Nevermind, this has been submitted