aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/libc/posix1e/acl_id_to_name.c4
-rw-r--r--lib/libc/posix1e/acl_to_text_nfs4.c4
2 files changed, 4 insertions, 4 deletions
diff --git a/lib/libc/posix1e/acl_id_to_name.c b/lib/libc/posix1e/acl_id_to_name.c
index 78e050a8648a..c90e6083cca1 100644
--- a/lib/libc/posix1e/acl_id_to_name.c
+++ b/lib/libc/posix1e/acl_id_to_name.c
@@ -67,7 +67,7 @@ _posix1e_acl_id_to_name(acl_tag_t tag, uid_t id, ssize_t buf_len, char *buf,
else
p = getpwuid(id);
if (!p)
- i = snprintf(buf, buf_len, "%d", id);
+ i = snprintf(buf, buf_len, "%ju", (uintmax_t)id);
else
i = snprintf(buf, buf_len, "%s", p->pw_name);
@@ -83,7 +83,7 @@ _posix1e_acl_id_to_name(acl_tag_t tag, uid_t id, ssize_t buf_len, char *buf,
else
g = getgrgid(id);
if (g == NULL)
- i = snprintf(buf, buf_len, "%d", id);
+ i = snprintf(buf, buf_len, "%ju", (uintmax_t)id);
else
i = snprintf(buf, buf_len, "%s", g->gr_name);
diff --git a/lib/libc/posix1e/acl_to_text_nfs4.c b/lib/libc/posix1e/acl_to_text_nfs4.c
index 157215c9dd52..4f19f3a9a7b2 100644
--- a/lib/libc/posix1e/acl_to_text_nfs4.c
+++ b/lib/libc/posix1e/acl_to_text_nfs4.c
@@ -69,7 +69,7 @@ format_who(char *str, size_t size, const acl_entry_t entry, int numeric)
else
pwd = NULL;
if (pwd == NULL)
- snprintf(str, size, "user:%d", (unsigned int)*id);
+ snprintf(str, size, "user:%ju", (uintmax_t)*id);
else
snprintf(str, size, "user:%s", pwd->pw_name);
acl_free(id);
@@ -89,7 +89,7 @@ format_who(char *str, size_t size, const acl_entry_t entry, int numeric)
else
grp = NULL;
if (grp == NULL)
- snprintf(str, size, "group:%d", (unsigned int)*id);
+ snprintf(str, size, "group:%ju", (uintmax_t)*id);
else
snprintf(str, size, "group:%s", grp->gr_name);
acl_free(id);