Skip to content

Commit cc75743

Browse files
committed
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
2 parents 45c9f05 + 3220565 commit cc75743

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

compat/fsmonitor/fsm-ipc-darwin.c

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,10 @@ static GIT_PATH_FUNC(fsmonitor_ipc__get_default_path, "fsmonitor--daemon.ipc")
1010
const char *fsmonitor_ipc__get_path(struct repository *r)
1111
{
1212
static const char *ipc_path = NULL;
13-
SHA_CTX sha1ctx;
13+
git_SHA_CTX sha1ctx;
1414
char *sock_dir = NULL;
1515
struct strbuf ipc_file = STRBUF_INIT;
16-
unsigned char hash[SHA_DIGEST_LENGTH];
16+
unsigned char hash[GIT_MAX_RAWSZ];
1717

1818
if (!r)
1919
BUG("No repository passed into fsmonitor_ipc__get_path");
@@ -28,9 +28,9 @@ const char *fsmonitor_ipc__get_path(struct repository *r)
2828
return ipc_path;
2929
}
3030

31-
SHA1_Init(&sha1ctx);
32-
SHA1_Update(&sha1ctx, r->worktree, strlen(r->worktree));
33-
SHA1_Final(hash, &sha1ctx);
31+
git_SHA1_Init(&sha1ctx);
32+
git_SHA1_Update(&sha1ctx, r->worktree, strlen(r->worktree));
33+
git_SHA1_Final(hash, &sha1ctx);
3434

3535
repo_config_get_string(r, "fsmonitor.socketdir", &sock_dir);
3636

0 commit comments

Comments
 (0)