me
/
guix
Archived
1
0
Fork 0

utils: 'set-file-time' passes AT_SYMLINK_NOFOLLOW.

* guix/build/utils.scm (AT_SYMLINK_NOFOLLOW): New variable.
(set-file-time): Use it.
master
Ludovic Courtès 2020-12-11 14:57:55 +01:00
parent 72809abc9e
commit b1e2ec008a
No known key found for this signature in database
GPG Key ID: 090B11993D9AEBB5
1 changed files with 9 additions and 1 deletions

View File

@ -924,13 +924,21 @@ a thunk."
(min len buffer-size)
buffer-size))))))
(define AT_SYMLINK_NOFOLLOW
;; Guile 2.0 did not define this constant, hence this hack.
(let ((variable (module-variable the-root-module 'AT_SYMLINK_NOFOLLOW)))
(if variable
(variable-ref variable)
256))) ;for GNU/Linux
(define (set-file-time file stat)
"Set the atime/mtime of FILE to that specified by STAT."
(utime file
(stat:atime stat)
(stat:mtime stat)
(stat:atimensec stat)
(stat:mtimensec stat)))
(stat:mtimensec stat)
AT_SYMLINK_NOFOLLOW))
(define (get-char* p)
;; We call it `get-char', but that's really a binary version