boost混合主程序编译,在编译文件系统模块时出现错误,NDK里没有sys/statvfs.h文件。
解决方法如下:
打开文件:
libs/filesystem/v2/src/v2_operations.cpp
将
# if !defined(__APPLE__) && !defined(__OpenBSD__)
# include <sys/statvfs.h>
# define BOOST_STATVFS statvfs
# define BOOST_STATVFS_F_FRSIZE vfs.f_frsize
# else
#ifdef __OpenBSD__
# include <sys/param.h>
#endif
# 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 __OpenBSD__
# include <sys/param.h>
#elif defined(__ANDROID__)
# include <sys/vfs.h>
#endif