facebook/wangle

build fail stat64 on mac 10.14

8427003 opened this issue · 1 comments

/Users/lijun/Downloads/wangle-2019.01.21.00/wangle/util/FilePoller.cpp:149:13: warning: 'stat64' is deprecated: first deprecated
in macOS 10.6 [-Wdeprecated-declarations]
int ret = stat64(path.c_str(), &info);
^
/usr/include/sys/stat.h:402:5: note: 'stat64' has been explicitly marked deprecated here
int stat64(const char *, struct stat64 *) __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_5,__MAC_10_6,__IPHONE_NA,__IPHONE_NA);
^
/Users/lijun/Downloads/wangle-2019.01.21.00/wangle/util/FilePoller.cpp:156:37: error: no member named 'st_mtim' in 'stat64'
std::chrono::seconds(info.st_mtim.tv_sec) +
~~~~ ^
/Users/lijun/Downloads/wangle-2019.01.21.00/wangle/util/FilePoller.cpp:157:41: error: no member named 'st_mtim' in 'stat64'
std::chrono::nanoseconds(info.st_mtim.tv_nsec))}

I have encountered the exact same problem. My MacOS is Mojave 10.14.1