diff options
author | ridiculousfish <corydoras@ridiculousfish.com> | 2014-05-31 13:46:28 -0700 |
---|---|---|
committer | ridiculousfish <corydoras@ridiculousfish.com> | 2014-05-31 13:46:28 -0700 |
commit | ce4081af934e37876f3b6e641935364b4d8bbfaf (patch) | |
tree | 08e8a7747af26142127bf1d04e865165a61c6664 /wutil.cpp | |
parent | 32f5edc9c5d8d08cc57abe84c804e87b898513e9 (diff) |
Fix some warnings in Linux build
Diffstat (limited to 'wutil.cpp')
-rw-r--r-- | wutil.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
@@ -35,7 +35,7 @@ typedef std::string cstring; -const file_id_t kInvalidFileID = {-1, -1, -1, -1, -1, -1}; +const file_id_t kInvalidFileID = {(dev_t)-1LL, (ino_t)-1LL, (uint64_t)-1LL, -1, -1, (uint32_t)-1}; /** Minimum length of the internal covnersion buffers @@ -319,6 +319,10 @@ static inline void safe_append(char *buffer, const char *s, size_t buffsize) strncat(buffer, s, buffsize - strlen(buffer) - 1); } +// In general, strerror is not async-safe, and therefore we cannot use it directly +// So instead we have to grub through sys_nerr and sys_errlist directly +// On GNU toolchain, this will produce a deprecation warning from the linker (!!), +// which appears impossible to suppress! const char *safe_strerror(int err) { #if defined(__UCLIBC__) |