diff --git a/libtransmission/natpmp.c b/libtransmission/natpmp.c index c18cfe2a6..529f35078 100644 --- a/libtransmission/natpmp.c +++ b/libtransmission/natpmp.c @@ -21,6 +21,7 @@ #include /* inet_ntoa */ #endif +#define ENABLE_STRNATPMPERR #include #include "transmission.h" @@ -69,7 +70,9 @@ logVal( const char * func, int ret ) if( ret >= 0 ) tr_ninf( getKey(), _( "%s succeeded (%d)" ), func, ret ); else - tr_ndbg( getKey(), "%s failed (%d): %s (%d)", func, ret, tr_strerror(errno), errno ); + tr_ndbg( getKey(), "%s failed. natpmp returned %d (%s); errno is %d (%s)", + func, ret, strnatpmperr(ret), errno, tr_strerror(errno) ); + } struct tr_natpmp* diff --git a/third-party/libnatpmp/Makefile.am b/third-party/libnatpmp/Makefile.am index 3fca7d53c..923ab169d 100644 --- a/third-party/libnatpmp/Makefile.am +++ b/third-party/libnatpmp/Makefile.am @@ -1,5 +1,7 @@ noinst_LIBRARIES = libnatpmp.a +AM_CPPFLAGS = -DENABLE_STRNATPMPERR + libnatpmp_a_SOURCES = \ getgateway.c \ natpmp.c