From 3387b66854a5bd2906c1eeb62469f193903320e2 Mon Sep 17 00:00:00 2001 From: Ron Dahlgren Date: Thu, 29 Jun 2023 19:47:54 -0400 Subject: [PATCH] Fixes compilation errors on macos --- ffi/ffi.lisp | 6 ++++-- ffi/grovel.lisp | 13 ++++++++++++- 2 files changed, 16 insertions(+), 3 deletions(-) diff --git a/ffi/ffi.lisp b/ffi/ffi.lisp index 715c8c1..1a0f50b 100644 --- a/ffi/ffi.lisp +++ b/ffi/ffi.lisp @@ -8,17 +8,19 @@ +#-darwin (define-foreign-library libc (:unix (:or "libc.so.6" "libc.so")) (:default "libc")) -#-openbsd +#-(or openbsd darwin) (define-foreign-library librt (:unix (:or "librt.so.1" "librt.so")) (:default "librt")) +#-darwin (use-foreign-library libc) -#-openbsd +#-(or openbsd darwin) (use-foreign-library librt) (defcfun "strerror" :string diff --git a/ffi/grovel.lisp b/ffi/grovel.lisp index 2b1fb7a..072ffe2 100644 --- a/ffi/grovel.lisp +++ b/ffi/grovel.lisp @@ -63,9 +63,20 @@ (st-blksize "st_blksize" :type blksize) (st-blocks "st_blocks" :type blkcnt) + #-darwin (st-atim "st_atim" :type timespec) + #+darwin + (st-atim "st_atimespec" :type timespec) + #-darwin (st-mtim "st_mtim" :type timespec) - (st-ctim "st_ctim" :type timespec)) + #+darwin + (st-atim "st_mtimespec" :type timespec) + #-darwin + (st-ctim "st_ctim" :type timespec) + #+darwin + (st-atim "st_ctimespec" :type timespec) + + ) (constantenum c-error ((:eacces "EACCES") -- 2.45.2