The source we are currently using is from 2015. The upstream repo has received a small number of bug fixes and improvements since then. Including one that fixes an issue for Windows users: https://github.com/miniupnp/libnatpmp/pull/13.
The source we are currently using is the most recent “official” release, however I don’t think it’s worth waiting for a new one. The maintainer was prompted to do so in Oct 2020, then again in Jan of this year, and no release has eventuated. Given libnatpmp is a new inclusion into our repository, I think we should be using this newer source.
This also cleans up a few warnings we currently see in Windows depends builds:
0Extracting libnatpmp...
1/home/ubuntu/bitcoin/depends/sources/libnatpmp-20150609.tar.gz: OK
2Preprocessing libnatpmp...
3Configuring libnatpmp...
4Building libnatpmp...
5make[1]: Entering directory '/home/ubuntu/bitcoin/depends/work/build/x86_64-w64-mingw32/libnatpmp/20150609-13efa1beb87'
6x86_64-w64-mingw32-gcc -Os -fPIC -Wall -DENABLE_STRNATPMPERR -c -o natpmp.o natpmp.c
7x86_64-w64-mingw32-gcc -Os -fPIC -Wall -DENABLE_STRNATPMPERR -c -o getgateway.o getgateway.c
8natpmp.c:42: warning: "EWOULDBLOCK" redefined
9 42 | #define EWOULDBLOCK WSAEWOULDBLOCK
10 |
11In file included from natpmp.c:38:
12/usr/share/mingw-w64/include/errno.h:166: note: this is the location of the previous definition
13 166 | #define EWOULDBLOCK 140
14 |
15natpmp.c:43: warning: "ECONNREFUSED" redefined
16 43 | #define ECONNREFUSED WSAECONNREFUSED
17 |
18In file included from natpmp.c:38:
19/usr/share/mingw-w64/include/errno.h:110: note: this is the location of the previous definition
20 110 | #define ECONNREFUSED 107
21 |
22natpmp.c:271:5: warning: ‘readnatpmpresponseorretry’ redeclared without dllimport attribute: previous dllimport ignored [-Wattributes]
23 271 | int readnatpmpresponseorretry(natpmp_t * p, natpmpresp_t * response)
24 | ^~~~~~~~~~~~~~~~~~~~~~~~~
25ar crs libnatpmp.a natpmp.o getgateway.o
26make[1]: Leaving directory '/home/ubuntu/bitcoin/depends/work/build/x86_64-w64-mingw32/libnatpmp/20150609-13efa1beb87'
27Staging libnatpmp...
28Postprocessing libnatpmp...
29Caching libnatpmp...