The attached patches fix two groups compilation errors when building dirmngr with mingw.org's MinGW:
- missing errno.h symbols (I wonder why the facilities of libgpg-error aren't used here?)
- use of npth_read, npth_write, and FD_ISSET when file descriptors are actually sockets