Compilation of r34854 with Visual Studio 2010 fails with
service_scan.cc(2559): error C2065: 'EOPNOTSUPP' : undeclared identifier
The root cause appears to be the absence of the corresponding definition in nbase/nbase_winunix.h. The following patch rectifies the issue:
--- a/nbase/nbase_winunix.h 2015-06-28 10:49:40.000000000 -0600
+++ b/nbase/nbase_winunix.h 2015-07-06 18:10:35.876970500 -0600
@@ -242,6 +242,8 @@
#define ENOBUFS WSAENOBUFS /* No buffer space available */
#define EMSGSIZE WSAEMSGSIZE /* Message too long */
+#define EOPNOTSUPP WSAEOPNOTSUPP /* Operation not supported */
#define ENOMEM WSAENOBUFS
@nnposter We skipped over VS 2010 in our own builds, so we did not encounter this problem, but we ran into other problems on VS 2013. As a workaround, we added the _MSC_VER check in nbase_winunix.h which seems to be working well. Could you try changing the version there from "1800" (VS 2013) to "1600" (VS 2010) and see if it solves the problem? Otherwise, we'll apply your fix.
Sourcing errno.h (by changing the _MSC_VER condition) takes care of the missing EOPNOTSUPP but it exposes the class/struct bug that Gisle recently reported, which was until then latent. Applying his fix makes everything compile without errors.
It seems to me that perhaps both changes (the conditional and the custom definition) should be applied. Otherwise we would not be treating the error codes consistently, such as EOPNOTSUPP vs EMSGSIZE.
Fix compilation on VS2010. Closes #183