summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNicholas Marriott <nicholas.marriott@gmail.com>2017-03-21 21:38:03 +0000
committerNicholas Marriott <nicholas.marriott@gmail.com>2017-03-21 21:38:03 +0000
commit3cc24861060b02637a0522176cc185c1c967aec3 (patch)
tree3070ba33002780c7be8831863469dd9484314b06
parent57cb6ef3a22369174a758b37dcb35893e29a6826 (diff)
parent02ddd4ce70eb893f109b918c624a9697f894e829 (diff)
Merge branch 'master' of github.com:tmux/tmux
-rw-r--r--tmux.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/tmux.c b/tmux.c
index b9809568..56da6821 100644
--- a/tmux.c
+++ b/tmux.c
@@ -110,18 +110,17 @@ make_label(const char *label)
{
char *base, resolved[PATH_MAX], *path, *s;
struct stat sb;
- u_int uid;
+ uid_t uid;
int saved_errno;
if (label == NULL)
label = "default";
-
uid = getuid();
if ((s = getenv("TMUX_TMPDIR")) != NULL && *s != '\0')
xasprintf(&base, "%s/tmux-%u", s, uid);
else
- xasprintf(&base, "%s/tmux-%u", _PATH_TMP, uid);
+ xasprintf(&base, "%s/tmux-%ld", _PATH_TMP, (long)uid);
if (mkdir(base, S_IRWXU) != 0 && errno != EEXIST)
goto fail;