Skip to content

Commit

Permalink
Fix compile issue on MacOS
Browse files Browse the repository at this point in the history
Macos does not have cuserid(), shitch to getlogin() which is
more portable anyway.

Signed-off-by: Ronnie Sahlberg <[email protected]>
  • Loading branch information
sahlberg committed Dec 11, 2024
1 parent 976a9ae commit 2044497
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/libnfs.c
Original file line number Diff line number Diff line change
Expand Up @@ -595,7 +595,7 @@ nfs_init_context(void)
return NULL;
}
#ifdef HAVE_LIBKRB5
rpc_set_username(nfs->rpc, cuserid(NULL));
rpc_set_username(nfs->rpc, getlogin());
#endif
nfs->nfsi->cwd = strdup("/");
nfs->nfsi->mask = 022;
Expand Down

0 comments on commit 2044497

Please sign in to comment.