From f1dd6202c6886de010f8aae846f08707db25b6ca Mon Sep 17 00:00:00 2001 From: Jeffrey Alan Scudder Date: Sun, 22 Mar 2026 18:55:31 +0000 Subject: [PATCH] cl: fix timespec struct order (must be defined before use) --- fedac/native/cl/util.lisp | 8 ++++---- 1 file(s) changed, 4 insertion(s)(+), 4 deletion(s)(-) diff --git a/fedac/native/cl/util.lisp b/fedac/native/cl/util.lisp --- a/fedac/native/cl/util.lisp +++ b/fedac/native/cl/util.lisp @@ -29,6 +29,10 @@ (setf *log-file* nil))) ;;; Monotonic clock +(cffi:defcstruct timespec + (tv-sec :long) + (tv-nsec :long)) + (cffi:defcfun ("clock_gettime" %clock-gettime) :int (clk-id :int) (tp :pointer)) @@ -42,10 +46,6 @@ (%clock-gettime +clock-monotonic+ ts) (let ((sec (cffi:foreign-slot-value ts '(:struct timespec) 'tv-sec)) (nsec (cffi:foreign-slot-value ts '(:struct timespec) 'tv-nsec))) (+ (* sec 1000.0d0) (/ nsec 1000000.0d0))))) - -(cffi:defcstruct timespec - (tv-sec :long) - (tv-nsec :long)) (cffi:defcfun ("clock_nanosleep" %clock-nanosleep) :int (clk-id :int) -- tangled.sh