]> Savannah Git Hosting - gnulib.git/commitdiff
sys_socket: Don't define socklen_t if it is already defined on mingw.
authorBruno Haible <bruno@clisp.org>
Tue, 30 Jun 2020 00:26:45 +0000 (02:26 +0200)
committerBruno Haible <bruno@clisp.org>
Tue, 30 Jun 2020 01:04:34 +0000 (03:04 +0200)
Reported by Keith Marshall <keith.d.marshall@ntlworld.com> in
<https://savannah.gnu.org/bugs/?57725>,
by Rahul Das <bokul_4u@yahoo.com> in
<https://lists.gnu.org/archive/html/bug-gnulib/2020-04/msg00081.html>,
and by Eli Zaretskii <eliz@gnu.org> in
<https://lists.gnu.org/archive/html/bug-gnulib/2020-06/msg00068.html>.

* lib/sys_socket.in.h (socklen_t): Remove definition.

ChangeLog
lib/sys_socket.in.h

index e0b5ace41b8c7231acbb977e815a374fa93d427e..9005fa33380241f0acf446147971d5941d3788ac 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,14 @@
+2020-06-29  Bruno Haible  <bruno@clisp.org>
+
+       sys_socket: Don't define socklen_t if it is already defined on mingw.
+       Reported by Keith Marshall <keith.d.marshall@ntlworld.com> in
+       <https://savannah.gnu.org/bugs/?57725>,
+       by Rahul Das <bokul_4u@yahoo.com> in
+       <https://lists.gnu.org/archive/html/bug-gnulib/2020-04/msg00081.html>,
+       and by Eli Zaretskii <eliz@gnu.org> in
+       <https://lists.gnu.org/archive/html/bug-gnulib/2020-06/msg00068.html>.
+       * lib/sys_socket.in.h (socklen_t): Remove definition.
+
 2020-06-29  Bruno Haible  <bruno@clisp.org>
 
        alloca-opt: Fix warning on mingw.
index 948d689a897e65d15d21052488dcf32859fb70b2..577947dc88de1f86ce04ce8aa77661cab89ddd7b 100644 (file)
@@ -195,12 +195,7 @@ struct sockaddr_storage
 /* Include headers needed by the emulation code.  */
 #  include <sys/types.h>
 #  include <io.h>
-
-#  if !GNULIB_defined_socklen_t
-typedef int socklen_t;
-#   define GNULIB_defined_socklen_t 1
-#  endif
-
+/* If these headers don't define socklen_t, <config.h> does.  */
 # endif
 
 /* Rudimentary 'struct msghdr'; this works as long as you don't try to