Package: cl-usocket / 0.8.8-3

issue-131-fix Patch series | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
Description: Fix on SBCL
  This should fix the autotest problem on sbcl.
Origin: upstream
Bug: https://github.com/usocket/usocket/issues/131
Applied-Upstream: f5beb2b784d6c3968e8de42275ddeacbb42a1b2e and afc13a3764b386030ce72abf4fda4f3677e67e88
Last-Update: 2025-01-05
---
This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
--- cl-usocket.orig/backend/sbcl.lisp
+++ cl-usocket/backend/sbcl.lisp
@@ -482,7 +482,8 @@
               (setf usocket (make-stream-socket :socket socket :stream *dummy-stream*))
               ;; binghe: use SOCKOPT-TCP-NODELAY as internal symbol
               ;;         to pass compilation on ECL without it.
-              (when (and nodelay sockopt-tcp-nodelay-p)
+	      (when (and nodelay sockopt-tcp-nodelay-p
+		         (not (pathnamep host))) ; Unix domain sockets do not have this option
                 (setf (sb-bsd-sockets::sockopt-tcp-nodelay socket) nodelay))
               (when (or local-host local-port)
                 (sb-bsd-sockets:socket-bind socket
--- cl-usocket.orig/usocket.lisp
+++ cl-usocket/usocket.lisp
@@ -797,7 +797,7 @@
 ;;
 ;; This function is contributed by Mariano Montone (https://github.com/mmontone)
 ;;
-(defun socket-listen (host &optional port  &rest args)
+(defun socket-listen (host port &rest args)
   (let ((socket-host host)
 	(socket-port port))
     (loop 
@@ -820,7 +820,7 @@
         (retry ()
 	  :report "Retry socket connection.")))))
 
-(defun socket-connect (host &optional port &rest args)
+(defun socket-connect (host port &rest args)
   (let ((socket-host host)
 	    (socket-port port))
     (loop