On 9/21/18 8:34 PM, Mark Christiansen wrote:
I switched to the same commit and I still get errors trying to apply the
patch:
$ patch -p1 < detect_socklen_t.patch
patching file configure
Hunk #1 FAILED at 26555.
1 out of 1 hunk FAILED -- saving rejects to file configure.rej
patching file configure.d/config_project_types
Hunk #1 FAILED at 37.
1 out of 1 hunk FAILED -- saving rejects to file
configure.d/config_project_types.rej
Here is my patch file. Did I make it the right way?
$ cat detect_socklen_t.patch
Subject: [PATCH] MinGW: Detect socklen_t correctly
Reported-by: Mark Christiansen <m...@markwc.com <mailto:m...@markwc.com>>
---
configure | 6 ++++++
configure.d/config_project_types | 6 ++++++
2 files changed, 12 insertions(+)
diff --git a/configure b/configure
index cad6b74486c3..195f45dde88a 100755
--- a/configure
+++ b/configure
@@ -26555,6 +26555,12 @@ _ACEOF
# Check for 'socklen_t' (HP-UX)
#
ac_fn_c_check_type "$LINENO" "socklen_t" "ac_cv_type_socklen_t" "
+#ifdef HAVE_WINSOCK2_H
+#include <winsock2.h>
+#endif
+#ifdef HAVE_WS2TCPIP_H
+#include <ws2tcpip.h>
+#endif
#include <sys/types.h>
#if STDC_HEADERS
#include <stdlib.h>
diff --git a/configure.d/config_project_types
b/configure.d/config_project_types
index b789b3d62f44..e5ed9ef21cdd 100644
--- a/configure.d/config_project_types
+++ b/configure.d/config_project_types
@@ -37,6 +37,12 @@ AC_DEFINE_UNQUOTED([NETSNMP_ATTRIBUTE_UNUSED], [${attr}],
# Check for 'socklen_t' (HP-UX)
#
AC_CHECK_TYPES([socklen_t],,,[
+#ifdef HAVE_WINSOCK2_H
+#include <winsock2.h>
+#endif
+#ifdef HAVE_WS2TCPIP_H
+#include <ws2tcpip.h>
+#endif
#include <sys/types.h>
#if STDC_HEADERS
#include <stdlib.h>
I wonder if I don't have everything set up right. I followed the
instructions in the "MinGW - Building" section of README.win32
1. Install GNU regex and GNU libintl binaries and developer files in
the MinGW tree.
I assume that means to copy the root folders in the GNU at what it means
to install the files in MinGW tree and I copied all the folders in the
GnuWin32 folder into the root directory thus adding files into bin,
include, lib, and the rest. I notice that even doing that, I get the
following output from configure:
checking regex.h usability... no
checking regex.h presence... no
checking for regex.h... no
Anyway, my goal is to build net-SNMP using OpenSSL 1.x on Windows 10.
This is the first I've worked with net-SNMP. I think once I can build it
then I can work on getting it to work with OpenSSL 1.x if it doesn't
already.
Hello Mark,
Instead of continuing to exchange instructions for how to apply a patch,
let's try another approach. I have applied that patch (and a few
continuous integration patches) on the v5.8 branch. Please update your
copy of the v5.8 branch and verify whether that branch now builds as
expected with MinGW. One way to update your copy of the v5.8 branch is
as follows:
git pull --rebase
Bart.
_______________________________________________
Net-snmp-coders mailing list
Net-snmp-coders@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/net-snmp-coders