common-lisp.net
/
projects/iolib/iolib.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
(parent:
462cf51
)
Fix isys/ptsname following libfixposix API change
author
Stelian Ionescu
<sionescu@cddr.org>
Sat, 9 Mar 2013 23:36:37 +0000 (
00:36
+0100)
committer
Stelian Ionescu
<sionescu@cddr.org>
Sat, 9 Mar 2013 23:36:37 +0000 (
00:36
+0100)
src/syscalls/ffi-functions-unix.lisp
patch
|
blob
|
blame
|
history
diff --git
a/src/syscalls/ffi-functions-unix.lisp
b/src/syscalls/ffi-functions-unix.lisp
index
80725e9
..
42549c1
100644
(file)
--- a/
src/syscalls/ffi-functions-unix.lisp
+++ b/
src/syscalls/ffi-functions-unix.lisp
@@
-484,13
+484,14
@@
Return two values: the file descriptor and the path of the temporary file."
(defsyscall (%ptsname "lfp_ptsname")
(:pointer :handle fd)
- (fd :int))
+ (fd :int)
+ (buf :pointer)
+ (buflen size-t))
(defentrypoint ptsname (fd)
- (let ((str (%ptsname fd)))
- (unwind-protect
- (nth-value 0 (foreign-string-to-lisp str))
- (foreign-free str))))
+ (with-foreign-pointer (buf +cstring-path-max+ bufsize)
+ (%ptsname fd buf bufsize)
+ (nth-value 0 (foreign-string-to-lisp buf))))
\f
;;;-------------------------------------------------------------------------