Error:
src/logger.cc: In static member function 'static std::string ndppd::logger::err()':
src/logger.cc:86:22: error: could not convert 'strerror_r((*__errno_location()), ((char*)(& buf)), sizeof (buf))'
from 'int' to 'std::string {aka std::basic_string<char>}'
return strerror_r(errno, buf, sizeof(buf));
Added and modified some patches from
eb81b8f2d6...navossoc:master
(See https://github.com/DanielAdolfsson/ndppd/issues/40 for details)
Compile-tested: octeon + mpc85xx openwrt master, musl + uclibc++
octeon openwrt master, glibc + libstdc++
Run-tested: octeon openwrt master, musl + uclibc++
Signed-off-by: Martin Strobel <arctus@crza.de>
Import upstream commit "f19fa4b Fix a cast so it can be compiled with gcc-6"
in order to fix building ndppd with recent gcc versions.
Fixes the following error spotted by the build bots:
src/iface.cc: In static member function 'static ndppd::ptr<ndppd::iface> ndppd::iface::open_pfd(const string&)':
src/iface.cc:153:5: error: narrowing conversion of '-1' from 'int' to '__u32 {aka unsigned int}' inside { } [-Wnarrowing]
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
Also update maintainer email address and cherry-pick commit 00da8bf to
prevent daemonizing before reading the configuration file.
Signed-off-by: Gabriel Kerneis <gabriel@kerneis.info>