diff options
author | Junio C Hamano <gitster@pobox.com> | 2022-10-21 21:37:27 +0300 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2022-10-21 21:37:27 +0300 |
commit | cc7574322fbf6d43cf5f36c7e98bd2e095bc3bc7 (patch) | |
tree | e974a72f43a271793f1493a60e5b1746a1e70504 | |
parent | 45c9f05c44b1cb6bd2d6cb95a22cf5e3d21d5b63 (diff) | |
parent | 32205655dc7ce44863bf79fb05bf170d9ad6da32 (diff) |
Merge branch 'ab/macos-build-fix-with-sha1dc'
Enable macOS build with sha1dc hash function.
* ab/macos-build-fix-with-sha1dc:
fsmonitor OSX: compile with DC_SHA1=YesPlease
-rw-r--r-- | compat/fsmonitor/fsm-ipc-darwin.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/compat/fsmonitor/fsm-ipc-darwin.c b/compat/fsmonitor/fsm-ipc-darwin.c index ce843d6334..d67b0ee50d 100644 --- a/compat/fsmonitor/fsm-ipc-darwin.c +++ b/compat/fsmonitor/fsm-ipc-darwin.c @@ -10,10 +10,10 @@ static GIT_PATH_FUNC(fsmonitor_ipc__get_default_path, "fsmonitor--daemon.ipc") const char *fsmonitor_ipc__get_path(struct repository *r) { static const char *ipc_path = NULL; - SHA_CTX sha1ctx; + git_SHA_CTX sha1ctx; char *sock_dir = NULL; struct strbuf ipc_file = STRBUF_INIT; - unsigned char hash[SHA_DIGEST_LENGTH]; + unsigned char hash[GIT_MAX_RAWSZ]; if (!r) BUG("No repository passed into fsmonitor_ipc__get_path"); @@ -28,9 +28,9 @@ const char *fsmonitor_ipc__get_path(struct repository *r) return ipc_path; } - SHA1_Init(&sha1ctx); - SHA1_Update(&sha1ctx, r->worktree, strlen(r->worktree)); - SHA1_Final(hash, &sha1ctx); + git_SHA1_Init(&sha1ctx); + git_SHA1_Update(&sha1ctx, r->worktree, strlen(r->worktree)); + git_SHA1_Final(hash, &sha1ctx); repo_config_get_string(r, "fsmonitor.socketdir", &sock_dir); |