From 269ca0a80104aa97f307d3c3a91d32ba1e45ee7c Mon Sep 17 00:00:00 2001 From: Stelian Ionescu Date: Sun, 10 Mar 2013 00:36:37 +0100 Subject: [PATCH] Fix isys/ptsname following libfixposix API change --- src/syscalls/ffi-functions-unix.lisp | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/src/syscalls/ffi-functions-unix.lisp b/src/syscalls/ffi-functions-unix.lisp index 80725e9..42549c1 100644 --- 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)))) ;;;------------------------------------------------------------------------- -- 2.11.4.GIT