mirror of
https://gitlab.com/embeddable-common-lisp/ecl.git
synced 2026-02-22 23:10:46 -08:00
Fix compilation failure under Win32/MSVC when using multi-thread support.
This commit is contained in:
parent
6eb59b8daa
commit
07613cb30a
1 changed files with 14 additions and 12 deletions
|
|
@ -47,6 +47,7 @@
|
|||
"#define MSG_WAITALL 0")
|
||||
#+:wsock
|
||||
(clines
|
||||
#+(and :msvc (not :threads))
|
||||
"#include <winsock2.h>"
|
||||
"typedef unsigned int uint32_t;"
|
||||
#-:mingw32
|
||||
|
|
@ -511,8 +512,9 @@ static void fill_inet_sockaddr(struct sockaddr_in *sockaddr, int port,
|
|||
(socket-error "bind"))))
|
||||
|
||||
(defmethod socket-accept ((socket inet-socket))
|
||||
(multiple-value-bind (fd vector)
|
||||
(c-inline ((socket-file-descriptor socket)) (:int) (values :int :object)
|
||||
(let ((sfd (socket-file-descriptor socket)))
|
||||
(multiple-value-bind (fd vector)
|
||||
(c-inline (sfd) (:int) (values :int :object)
|
||||
"{
|
||||
struct sockaddr_in sockaddr;
|
||||
int addr_len = sizeof(struct sockaddr_in);
|
||||
|
|
@ -533,16 +535,16 @@ static void fill_inet_sockaddr(struct sockaddr_in *sockaddr, int port,
|
|||
@(return 1) = vector;
|
||||
}
|
||||
}")
|
||||
(cond
|
||||
((= fd -1)
|
||||
(socket-error "accept"))
|
||||
(t
|
||||
(values
|
||||
(make-instance (class-of socket)
|
||||
:type (socket-type socket)
|
||||
:protocol (socket-protocol socket)
|
||||
:descriptor fd)
|
||||
vector)))))
|
||||
(cond
|
||||
((= fd -1)
|
||||
(socket-error "accept"))
|
||||
(t
|
||||
(values
|
||||
(make-instance (class-of socket)
|
||||
:type (socket-type socket)
|
||||
:protocol (socket-protocol socket)
|
||||
:descriptor fd)
|
||||
vector))))))
|
||||
|
||||
(defmethod socket-connect ((socket inet-socket) &rest address)
|
||||
(let ((ip (first address))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue