Merge branch 'v0.23.x'
This commit is contained in:
@@ -12,17 +12,23 @@ if is_windows
|
||||
icu_sources += 'Win32.cxx'
|
||||
endif
|
||||
|
||||
iconv_dep = []
|
||||
if icu_dep.found()
|
||||
icu_sources += [
|
||||
'Util.cxx',
|
||||
'Init.cxx',
|
||||
]
|
||||
elif not get_option('iconv').disabled()
|
||||
have_iconv = compiler.has_function('iconv', prefix : '#include <iconv.h>')
|
||||
conf.set('HAVE_ICONV', have_iconv)
|
||||
# an installed iconv library will make the builtin iconv() unavailable,
|
||||
# so search for the library first and pass it as (possible) dependency
|
||||
iconv_dep = compiler.find_library('libiconv', required: false)
|
||||
have_iconv = compiler.has_function('iconv',
|
||||
dependencies: iconv_dep,
|
||||
prefix : '#include <iconv.h>')
|
||||
if not have_iconv and get_option('iconv').enabled()
|
||||
error('iconv() not available')
|
||||
endif
|
||||
conf.set('HAVE_ICONV', have_iconv)
|
||||
endif
|
||||
|
||||
icu = static_library(
|
||||
@@ -31,6 +37,7 @@ icu = static_library(
|
||||
include_directories: inc,
|
||||
dependencies: [
|
||||
icu_dep,
|
||||
iconv_dep,
|
||||
fmt_dep,
|
||||
],
|
||||
)
|
||||
|
@@ -35,13 +35,7 @@ static unsigned upnp_ref;
|
||||
static void
|
||||
DoInit(const char* iface)
|
||||
{
|
||||
|
||||
#ifdef UPNP_ENABLE_IPV6
|
||||
auto code = UpnpInit2(iface, 0);
|
||||
#else
|
||||
auto code = UpnpInit(iface, 0);
|
||||
#endif
|
||||
if (code != UPNP_E_SUCCESS)
|
||||
if (auto code = UpnpInit2(iface, 0); code != UPNP_E_SUCCESS)
|
||||
throw FormatRuntimeError("UpnpInit() failed: %s",
|
||||
UpnpGetErrorMessage(code));
|
||||
|
||||
|
Reference in New Issue
Block a user