Index: arguments.c --- arguments.c.orig 2021-01-17 18:17:08.000000000 +0100 +++ arguments.c 2021-04-13 19:25:12.613576000 +0200 @@ -72,7 +72,9 @@ args = xcalloc(1, sizeof *args); +#ifdef __Linux__ optreset = 1; +#endif optind = 1; optarg = NULL; Index: compat.h --- compat.h.orig 2021-03-02 13:07:17.000000000 +0100 +++ compat.h 2021-04-13 19:25:12.613700000 +0200 @@ -289,6 +289,22 @@ int getdtablecount(void); #endif +#ifndef MAXPATHLEN +#define MAXPATHLEN 4096 +#endif + +#ifndef PATH_MAX +#define PATH_MAX 4096 +#endif + +#ifndef MAXHOSTNAMELEN +#define MAXHOSTNAMELEN 64 +#endif + +#ifndef IOV_MAX +#define IOV_MAX 1024 +#endif + #ifndef HAVE_CLOSEFROM /* closefrom.c */ void closefrom(int); Index: osdep-freebsd.c --- osdep-freebsd.c.orig 2021-03-02 13:07:17.000000000 +0100 +++ osdep-freebsd.c 2021-04-13 19:25:12.613816000 +0200 @@ -28,7 +28,9 @@ #include #include #include +#if 0 #include +#endif #include "compat.h" @@ -136,6 +138,7 @@ static char * osdep_get_cwd_fallback(int fd) { +#if 0 static char wd[PATH_MAX]; struct kinfo_file *info = NULL; pid_t pgrp; @@ -156,6 +159,7 @@ } free(info); +#endif return (NULL); } Index: tmux.1 --- tmux.1.orig 2021-04-13 07:26:00.000000000 +0200 +++ tmux.1 2021-04-13 19:26:33.530864000 +0200 @@ -874,7 +874,7 @@ .Ql - may be followed by an offset, for example: .Bd -literal -offset indent -select-window -t:+2 +select-window \-t:+2 .Ed .Pp In addition, @@ -984,11 +984,11 @@ .Bd -literal -offset indent refresh-client -t/dev/ttyp2 -rename-session -tfirst newname +rename-session \-tfirst newname set-option -wt:0 monitor-activity on -new-window ; split-window -d +new-window ; split-window \-d bind-key R source-file ~/.tmux.conf \e; \e display-message "source-file done" @@ -997,11 +997,11 @@ Or from .Xr sh 1 : .Bd -literal -offset indent -$ tmux kill-window -t :1 +$ tmux kill-window \-t :1 -$ tmux new-window \e; split-window -d +$ tmux new-window \e; split-window \-d -$ tmux new-session -d 'vi ~/.tmux.conf' \e; split-window -d \e; attach +$ tmux new-session \-d 'vi ~/.tmux.conf' \e; split-window \-d \e; attach .Ed .Sh CLIENTS AND SESSIONS The @@ -2029,7 +2029,7 @@ and the result executed as a command. If .Ar template -is not given, "detach-client -t '%%'" is used. +is not given, "detach-client \-t '%%'" is used. .Pp .Fl O specifies the initial sort field: one of @@ -2110,7 +2110,7 @@ and the result executed as a command. If .Ar template -is not given, "switch-client -t '%%'" is used. +is not given, "switch-client \-t '%%'" is used. .Pp .Fl O specifies the initial sort field: one of @@ -2220,7 +2220,7 @@ substituted by the pane ID. The default .Ar template -is "select-pane -t '%%'". +is "select-pane \-t '%%'". With .Fl b , other commands are not blocked from running until the indicator is closed. @@ -2567,7 +2567,7 @@ option only opens a new pipe if no previous pipe exists, allowing a pipe to be toggled with a single key, for example: .Bd -literal -offset indent -bind-key C-p pipe-pane -o 'cat >>~/output.#I-#P' +bind-key C-p pipe-pane \-o 'cat >>~/output.#I-#P' .Ed .It Xo Ic previous-layout .Op Fl t Ar target-window @@ -3288,16 +3288,16 @@ is appended to the existing setting. For example: .Bd -literal -offset indent -set -g status-left "foo" -set -ag status-left "bar" +set \-g status-left "foo" +set \-ag status-left "bar" .Ed .Pp Will result in .Ql foobar . And: .Bd -literal -offset indent -set -g status-style "bg=red" -set -ag status-style "fg=blue" +set \-g status-style "bg=red" +set \-ag status-style "fg=blue" .Ed .Pp Will result in a red background @@ -3865,7 +3865,7 @@ Examples are: .Bd -literal -offset indent #(sysctl vm.loadavg) -#[fg=yellow,bold]#(apm -l)%%#[default] [#S] +#[fg=yellow,bold]#(apm \-l)%%#[default] [#S] .Ed .Pp The default is @@ -4338,8 +4338,8 @@ .Fl H . The following two commands are equivalent: .Bd -literal -offset indent. -set-hook -g pane-mode-changed[42] 'set -g status-left-style bg=red' -set-option -g pane-mode-changed[42] 'set -g status-left-style bg=red' +set-hook \-g pane-mode-changed[42] 'set \-g status-left-style bg=red' +set-option \-g pane-mode-changed[42] 'set \-g status-left-style bg=red' .Ed .Pp Setting a hook without specifying an array index clears the hook and sets the @@ -4355,7 +4355,7 @@ layout after every .Ic split-window : .Bd -literal -offset indent -set-hook -g after-split-window "selectl even-vertical" +set-hook \-g after-split-window "selectl even-vertical" .Ed .Pp All the notifications listed in the @@ -5745,7 +5745,7 @@ and the result executed as a command. If .Ar template -is not given, "paste-buffer -b '%%'" is used. +is not given, "paste-buffer \-b '%%'" is used. .Pp .Fl O specifies the initial sort field: one of @@ -6407,22 +6407,22 @@ .Pp Changing the default prefix key: .Bd -literal -offset indent -set-option -g prefix C-a +set-option \-g prefix C-a unbind-key C-b bind-key C-a send-prefix .Ed .Pp Turning the status line off, or changing its colour: .Bd -literal -offset indent -set-option -g status off -set-option -g status-style bg=blue +set-option \-g status off +set-option \-g status-style bg=blue .Ed .Pp Setting other options, such as the default command, or locking after 30 minutes of inactivity: .Bd -literal -offset indent -set-option -g default-command "exec /bin/ksh" -set-option -g lock-after-time 1800 +set-option \-g default-command "exec /bin/ksh" +set-option \-g lock-after-time 1800 .Ed .Pp Creating new key bindings: