depot/third_party/nixpkgs/pkgs/development/libraries/librist/darwin.patch
Default email 23b612e36f Project import generated by Copybara.
GitOrigin-RevId: ae5c332cbb5827f6b1f02572496b141021de335f
2024-01-25 23:12:00 +09:00

16 lines
489 B
Diff

diff --git a/tools/srp_shared.c b/tools/srp_shared.c
index f782126..23e82a5 100644
--- a/tools/srp_shared.c
+++ b/tools/srp_shared.c
@@ -173,7 +173,11 @@ void user_verifier_lookup(char * username,
if (stat(srpfile, &buf) != 0)
return;
+#if defined(__APPLE__)
+ *generation = ((uint64_t)buf.st_mtimespec.tv_sec << 32) | buf.st_mtimespec.tv_nsec;
+#else
*generation = ((uint64_t)buf.st_mtim.tv_sec << 32) | buf.st_mtim.tv_nsec;
+#endif
#endif
if (!lookup_data || !hashversion)