summaryrefslogtreecommitdiffstats
path: root/tmux.c
diff options
context:
space:
mode:
authorThomas Adam <thomas@xteddy.org>2017-03-21 20:01:16 +0000
committerThomas Adam <thomas@xteddy.org>2017-03-21 20:01:16 +0000
commit02ddd4ce70eb893f109b918c624a9697f894e829 (patch)
tree57f9bd45571ae56b5402604fbda1d3ea040f9bde /tmux.c
parentb008a07ebb9a2952db4a1fe8f8f8167e37347b54 (diff)
parent04e17a7e110bb0c70bc917b340aedd94fa60891f (diff)
Merge branch 'obsd-master'
Diffstat (limited to 'tmux.c')
-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;