$OpenBSD: patch-sslscan_c,v 1.8 2018/01/01 14:35:24 sthen Exp $

Index: sslscan.c
--- sslscan.c.orig
+++ sslscan.c
@@ -90,9 +90,7 @@
 #include <openssl/x509.h>
 #include <openssl/x509v3.h>
 #include <openssl/ocsp.h>
-#ifdef __linux__
-    #include <arpa/inet.h>
-#endif
+#include <arpa/inet.h>
 #ifndef OPENSSL_NO_COMP
   #include <openssl/comp.h>
 #endif
@@ -488,18 +486,10 @@ int tcpConnect(struct sslCheckOptions *options)
         if (!readOrLogAndClose(socketDescriptor, buffer, BUFFERSIZE, options))
             return 0;
 
-#ifdef __USE_GNU
         if (memmem(buffer, BUFFERSIZE, ok, sizeof(ok))) {
-#else
-        if (strnstr(buffer, ok, BUFFERSIZE)) {
-#endif
             printf_verbose("STARTLS LDAP setup complete.\n");
         }
-#ifdef __USE_GNU
         else if (memmem(buffer, BUFFERSIZE, unsupported, sizeof(unsupported))) {
-#else
-        else if (strnstr(buffer, unsupported, BUFFERSIZE)) {
-#endif
             printf_error("%sSTARTLS LDAP connection to %s:%d failed with '%s'.%s\n",
                          COL_RED, options->host, options->port, unsupported, RESET);
             return 0;
