]> git.ipfire.org Git - thirdparty/snort3.git/commitdiff
Merge pull request #623 in SNORT/snort3 from tcp_connector_UT_osx to master
authorMichael Altizer (mialtize) <mialtize@cisco.com>
Thu, 15 Sep 2016 15:03:54 +0000 (11:03 -0400)
committerMichael Altizer (mialtize) <mialtize@cisco.com>
Thu, 15 Sep 2016 15:03:54 +0000 (11:03 -0400)
Squashed commit of the following:

commit a64e28d02f5d75c75528d61936e99a3052254f20
Author: Ed Borgoyn <eborgoyn@cisco.com>
Date:   Thu Sep 15 09:42:45 2016 -0400

    Fix tcp_connector_test for OSX build.

src/connectors/tcp_connector/test/tcp_connector_test.cc

index 1e4a2270f7baf89a9eb73d9553946aa8eefe0b58..25148bbbd434ba9a2962e30200460fad27bb74cf 100644 (file)
 #include <CppUTest/CommandLineTestRunner.h>
 #include <CppUTest/TestHarness.h>
 
+#ifdef MACOS
+#define __THROW
+#define __SOCKADDR_ARG          struct sockaddr*
+#define __CONST_SOCKADDR_ARG    const struct sockaddr*
+#endif
+
 extern const BaseApi* tcp_connector;
 ConnectorApi* tcpc_api = nullptr;
 
@@ -89,7 +95,7 @@ int poll (struct pollfd* fds, nfds_t nfds, int)
 
     if ( s_poll_undesirable )
     {
-        fds[0].revents |= POLLRDHUP;
+        fds[0].revents |= POLLHUP;
         return 1;
     }