Opened 9 years ago

#8816 new Bugs

Android: error: fatal error: sys/statvfs.h: No such file or directory

Reported by: mik01@… Owned by: Beman Dawes
Milestone: To Be Determined Component: filesystem
Version: Boost 1.54.0 Severity: Problem
Keywords: Cc:

Description

Android doesn't have sys/statvfs.h. instead sys/vfs.h should be used.

possible fix (libs/filesystem/src/operations.cpp):

#   if !defined(__APPLE__) && !defined(__OpenBSD__) && !defined(__ANDROID__)
#     include <sys/statvfs.h>
#     define BOOST_STATVFS statvfs
#     define BOOST_STATVFS_F_FRSIZE vfs.f_frsize
#   else
#     ifdef __ANDROID__
#     include <sys/vfs.h>
#     endif
#     ifdef __OpenBSD__
#     include <sys/param.h>
#     endif
#     include <sys/mount.h>
#     define BOOST_STATVFS statfs
#     define BOOST_STATVFS_F_FRSIZE static_cast<boost::uintmax_t>(vfs.f_bsize)
#   endif

Change History (0)

Note: See TracTickets for help on using tickets.