On Fri, Sep 21, 2018 at 7:49 AM Bart Van Assche <bvanass...@acm.org> wrote:
> On 9/21/18 5:43 AM, Mark Christiansen wrote: > > Thanks. I tried to apply the patch and get the following: > > > > $ git apply detect_socklen_t.patch ce > > warning: configure has type 100644, expected 100755 > > error: patch failed: configure:26555 > > error: configure: patch does not apply > > error: patch failed: configure.d/config_project_types:37 > > error: configure.d/config_project_types: patch does not apply > > > > Commit c6e392d515e39a150fb2f699725c6f7beb19c0b1, which is on the > v5-8-patches branch. Can you try patch -p1 < ${patch_file} instead of > git apply? The patch command is more flexible if it encounters a context > mismatch than git apply. > 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> --- 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. Thanks. Mark.
_______________________________________________ Net-snmp-coders mailing list Net-snmp-coders@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/net-snmp-coders