view src/mingw-zeromq-1-fixes.patch @ 5893:53a6c7df43f8

Mesa 3D: Update to version 21.1.8. * src/mesa.mk: Update version and checksum. * src/mesa-2-uninitialized.patch: Remove file. * dist-files.mk: Remove file from list.
author Markus Mützel <markus.muetzel@gmx.de>
date Thu, 16 Sep 2021 22:37:45 +0200
parents 3c303f9b5a36
children
line wrap: on
line source

--- a/tests/testutil.cpp
+++ b/tests/testutil.cpp
@@ -382,7 +382,7 @@ fd_t connect_socket (const char *endpoint_, const int af_, const int protocol_)
                                protocol_ == IPPROTO_UDP
                                  ? IPPROTO_UDP
                                  : protocol_ == IPPROTO_TCP ? IPPROTO_TCP : 0);
-    TEST_ASSERT_NOT_EQUAL (-1, s_pre);
+    TEST_ASSERT_NOT_EQUAL (retired_fd, s_pre);

     if (af_ == AF_INET || af_ == AF_INET6) {
         const char *port = strrchr (endpoint_, ':') + 1;
@@ -439,7 +439,7 @@ fd_t bind_socket_resolve_port (const char *address_,
                                protocol_ == IPPROTO_UDP
                                  ? IPPROTO_UDP
                                  : protocol_ == IPPROTO_TCP ? IPPROTO_TCP : 0);
-    TEST_ASSERT_NOT_EQUAL (-1, s_pre);
+    TEST_ASSERT_NOT_EQUAL (retired_fd, s_pre);

     if (af_ == AF_INET || af_ == AF_INET6) {
 #ifdef ZMQ_HAVE_WINDOWS

--- a/tests/testutil.hpp
+++ b/tests/testutil.hpp
@@ -102,7 +102,6 @@ const uint8_t zmtp_ready_sub[27] = {
 #include <winsock2.h>
 #include <ws2tcpip.h>
 #include <stdexcept>
-#define close closesocket
 typedef int socket_size_t;
 inline const char *as_setsockopt_opt_t (const void *opt)
 {

--- a/tests/testutil.cpp
+++ b/tests/testutil.cpp
@@ -296,7 +296,7 @@ int is_ipv6_available ()
                 ipv6 = 0;
         }
 #endif
-        close (fd);
+        closesocket (fd);
     }

     return ipv6;
@@ -484,7 +484,7 @@ fd_t bind_socket_resolve_port (const char *address_,
 #else
         int fd = mkstemp (buffer);
         TEST_ASSERT_TRUE (fd != -1);
-        close (fd);
+        closesocket (fd);
 #endif
 #endif
         strcpy ((*(struct sockaddr_un *) &addr).sun_path, buffer);
diff -ur zeromq-4.3.3.orig/Makefile.in zeromq-4.3.3/Makefile.in
--- zeromq-4.3.3.orig/Makefile.in	2021-01-16 16:58:57.118548621 -0500
+++ zeromq-4.3.3/Makefile.in	2021-01-16 17:07:39.885588121 -0500
@@ -2881,7 +2881,7 @@
 	$(am__append_29) $(am__append_30) $(am__append_31) \
 	$(am__append_32) $(am__append_33) $(am__append_36) \
 	$(am__append_37) $(am__append_38) $(am__append_39)
-UNITY_CPPFLAGS = -I$(top_srcdir)/external/unity -DUNITY_USE_COMMAND_LINE_ARGS -DUNITY_EXCLUDE_FLOAT
+UNITY_CPPFLAGS = -I$(top_srcdir)/external/unity -DUNITY_USE_COMMAND_LINE_ARGS -DUNITY_EXCLUDE_FLOAT -D__USE_MINGW_ANSI_STDIO=1
 UNITY_LIBS = $(top_builddir)/external/unity/libunity.a
 external_unity_libunity_a_SOURCES = external/unity/unity.c \
 	external/unity/unity.h \