Merge pull request #194838 from Et7f3/fix-geomyidae-darwin

geomyidae: fix on darwin
This commit is contained in:
Robert Scott 2022-10-08 15:33:23 +01:00 committed by GitHub
commit 2da4018528
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 15 additions and 0 deletions

View File

@ -12,6 +12,8 @@ stdenv.mkDerivation rec {
buildInputs = [ libressl ];
patches = lib.optionals stdenv.isDarwin [ ./modification-time.patch ];
makeFlags = [ "PREFIX=${placeholder "out"}" ];
meta = with lib; {

View File

@ -0,0 +1,13 @@
diff --git a/geomyidae-v0.51/handlr.c b/geomyidae-v0.51/handlr.c
index 0c230d32519..9fc043fa3c9 100644
--- a/handlr.c
+++ b/handlr.c
@@ -71,7 +71,7 @@ handledir(int sock, char *path, char *port, char *base, char *args,
*type->type,
dirent[i]->d_name,
humansize(st.st_size),
- humantime(&(st.st_mtim.tv_sec)),
+ humantime(&(st.st_mtimespec.tv_sec)),
e, ohost, port);
free(file);
free(dirent[i]);