Skip to content

Commit 64d81cd

Browse files
committed
Fix I/O error codes. (fixes #103)
1 parent 8cfaced commit 64d81cd

File tree

2 files changed

+10
-11
lines changed

2 files changed

+10
-11
lines changed

src/syscall/main.lisp

-10
Original file line numberDiff line numberDiff line change
@@ -43,16 +43,6 @@
4343
(defconstant F-SETFL 4.)
4444
(defconstant O-NONBLOCK 4.)
4545

46-
(defconstant EWOULDBLOCK 35.)
47-
(defconstant EPIPE 32.)
48-
(defconstant EINTR 4.)
49-
(defconstant EPROTO 100.)
50-
(defconstant ECONNABORTED 53.)
51-
(defconstant ECONNREFUSED 61.)
52-
(defconstant ECONNRESET 54.)
53-
(defconstant ENOTCONN 57.)
54-
(defconstant EAGAIN 11.)
55-
5646
(defun set-fd-nonblock (fd enabled)
5747
(declare (optimize (speed 3) (safety 0)))
5848
(let ((current-flags (%fcntl/noarg fd F-GETFL)))

src/syscall/types.lisp

+10-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
(include "sys/types.h" "sys/fcntl.h")
1+
(include "sys/types.h" "sys/fcntl.h" "errno.h")
22
#+(or freebsd bsd)
33
(include "sys/socket.h")
44

@@ -14,3 +14,12 @@
1414
(constant (+SF-MNOWAIT+ "SF_MNOWAIT"))
1515

1616
(constant (+O-RDONLY+ "O_RDONLY"))
17+
(constant (EWOULDBLOCK "EWOULDBLOCK"))
18+
(constant (EPIPE "EPIPE"))
19+
(constant (EINTR "EINTR"))
20+
(constant (EPROTO "EPROTO"))
21+
(constant (ECONNABORTED "ECONNABORTED"))
22+
(constant (ECONNREFUSED "ECONNREFUSED"))
23+
(constant (ECONNRESET "ECONNRESET"))
24+
(constant (ENOTCONN "ENOTCONN"))
25+
(constant (EAGAIN "EAGAIN"))

0 commit comments

Comments
 (0)