[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

[tor-commits] [tor/master] Another clang+_FORTIFY_SOURCE issue



commit 1318c1611fed301f44d69a2d6e4f012efd94c9cc
Author: Nick Mathewson <nickm@xxxxxxxxxxxxxx>
Date:   Mon Feb 22 14:07:58 2016 -0500

    Another clang+_FORTIFY_SOURCE issue
    
    There was a parenthesis issue in test_util that clang found
    confusing.  This part was only in master.
    
    Closes issue 14821.
---
 src/test/test_util.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/src/test/test_util.c b/src/test/test_util.c
index 37f7d93..0cec0c4 100644
--- a/src/test/test_util.c
+++ b/src/test/test_util.c
@@ -4364,7 +4364,8 @@ test_util_socket(void *arg)
   (void)arg;
 
   fd1 = tor_open_socket_with_extensions(domain, SOCK_STREAM, 0, 0, 0);
-  if (SOCK_ERR_IS_EPROTO(fd1)) {
+  int err = tor_socket_errno(fd1);
+  if (fd1 < 0 && err == SOCK_ERRNO(EPROTONOSUPPORT)) {
     /* Assume we're on an IPv4-only or IPv6-only system, and give up now. */
     goto done;
   }

_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits