8e7a8d7d00ea12b34910ce6ecdb11174f68f0d1e
[packages.git] / utils / tmux / patches / 100-b64_ntop-conflict.patch
1 Index: tmux-1.6/compat.h
2 ===================================================================
3 --- tmux-1.6.orig/compat.h
4 +++ tmux-1.6/compat.h
5 @@ -198,7 +198,9 @@ int          daemon(int, int);
6  
7  #ifndef HAVE_B64_NTOP
8  /* b64_ntop.c */
9 -int             b64_ntop(const char *, size_t, char *, size_t);
10 +int             local_b64_ntop(const char *, size_t, char *, size_t);
11 +#else
12 +#define local_b64_ntop b64_ntop
13  #endif
14  
15  #ifndef HAVE_FORKPTY
16 Index: tmux-1.6/compat/b64_ntop.c
17 ===================================================================
18 --- tmux-1.6.orig/compat/b64_ntop.c
19 +++ tmux-1.6/compat/b64_ntop.c
20 @@ -122,7 +122,7 @@ static const char Pad64 = '=';
21     */
22  
23  int
24 -b64_ntop(uint8_t const *src, size_t srclength, char *target, size_t targsize) {
25 +local_b64_ntop(uint8_t const *src, size_t srclength, char *target, size_t targsize) {
26         size_t datalength = 0;
27         uint8_t input[3];
28         uint8_t output[4];
29 Index: tmux-1.6/tty.c
30 ===================================================================
31 --- tmux-1.6.orig/tty.c
32 +++ tmux-1.6/tty.c
33 @@ -1006,7 +1006,7 @@ tty_cmd_setselection(struct tty *tty, co
34         off = 4 * ((ctx->num + 2) / 3) + 1; /* storage for base64 */
35         buf = xmalloc(off);
36  
37 -       b64_ntop(ctx->ptr, ctx->num, buf, off);
38 +       local_b64_ntop(ctx->ptr, ctx->num, buf, off);
39         tty_putcode_ptr2(tty, TTYC_MS, "", buf);
40  
41         xfree(buf);