Modify

Ticket #8816 (new Bugs)

Opened 4 years ago

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

Reported by: mik01@… Owned by: bemandawes
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

Attachments

View

Add a comment

Modify Ticket

Change Properties
<Author field>
Action
as new
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.