aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJustin M. Keyes <justinkz@gmail.com>2016-01-01 14:56:11 -0500
committerJustin M. Keyes <justinkz@gmail.com>2016-01-01 14:56:11 -0500
commitadf11f3478a665713d1817b19423a4eb260253cf (patch)
tree783e73900ab7432cd286e656b3416ce08bea1c0f
parentf1344bc2198c4e433dedbc8b0662ba90cb5eaf1c (diff)
parentff0253127eb8a8a15017d9c1bbdc9fc6f14298c9 (diff)
downloadrneovim-adf11f3478a665713d1817b19423a4eb260253cf.tar.gz
rneovim-adf11f3478a665713d1817b19423a4eb260253cf.tar.bz2
rneovim-adf11f3478a665713d1817b19423a4eb260253cf.zip
Merge pull request #3925 from sethjackson/uv-uid-t
Windows: Make the os_get_uname argument portable
-rw-r--r--src/nvim/os/users.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/nvim/os/users.c b/src/nvim/os/users.c
index 637a86c74f..8ebb7562ef 100644
--- a/src/nvim/os/users.c
+++ b/src/nvim/os/users.c
@@ -42,17 +42,17 @@ int os_get_usernames(garray_T *users)
int os_get_user_name(char *s, size_t len)
{
#ifdef UNIX
- return os_get_uname(getuid(), s, len);
+ return os_get_uname((uv_uid_t)getuid(), s, len);
#else
// TODO(equalsraf): Windows GetUserName()
- return os_get_uname(0, s, len);
+ return os_get_uname((uv_uid_t)0, s, len);
#endif
}
// Insert user name for "uid" in s[len].
// Return OK if a name found.
// If the name is not found, write the uid into s[len] and return FAIL.
-int os_get_uname(uid_t uid, char *s, size_t len)
+int os_get_uname(uv_uid_t uid, char *s, size_t len)
{
#if defined(HAVE_PWD_H) && defined(HAVE_GETPWUID)
struct passwd *pw;