[packages] tmux: fix b64_ntop conflict
Certain uClibc versions declare b64_ntop but do not actually implement it, this leads to conflicting declarations when the tmux compat replacement function is used. Rename the replacement to local_b64_ntop and define b64_ntop to local_b64_ntop if the libc indeed implements it. git-svn-id: svn://svn.openwrt.org/openwrt/packages@30355 3c298f89-4303-0410-b956-a3cf2f4a3e73
This commit is contained in:
parent
c8011c7674
commit
ad7b409a83
@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=tmux
|
||||
PKG_VERSION:=1.6
|
||||
PKG_RELEASE:=1
|
||||
PKG_RELEASE:=2
|
||||
|
||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
|
||||
PKG_SOURCE_URL:=@SF/tmux
|
||||
|
41
utils/tmux/patches/100-b64_ntop-conflict.patch
Normal file
41
utils/tmux/patches/100-b64_ntop-conflict.patch
Normal file
@ -0,0 +1,41 @@
|
||||
Index: tmux-1.6/compat.h
|
||||
===================================================================
|
||||
--- tmux-1.6.orig/compat.h
|
||||
+++ tmux-1.6/compat.h
|
||||
@@ -198,7 +198,9 @@ int daemon(int, int);
|
||||
|
||||
#ifndef HAVE_B64_NTOP
|
||||
/* b64_ntop.c */
|
||||
-int b64_ntop(const char *, size_t, char *, size_t);
|
||||
+int local_b64_ntop(const char *, size_t, char *, size_t);
|
||||
+#else
|
||||
+#define local_b64_ntop b64_ntop
|
||||
#endif
|
||||
|
||||
#ifndef HAVE_FORKPTY
|
||||
Index: tmux-1.6/compat/b64_ntop.c
|
||||
===================================================================
|
||||
--- tmux-1.6.orig/compat/b64_ntop.c
|
||||
+++ tmux-1.6/compat/b64_ntop.c
|
||||
@@ -122,7 +122,7 @@ static const char Pad64 = '=';
|
||||
*/
|
||||
|
||||
int
|
||||
-b64_ntop(uint8_t const *src, size_t srclength, char *target, size_t targsize) {
|
||||
+local_b64_ntop(uint8_t const *src, size_t srclength, char *target, size_t targsize) {
|
||||
size_t datalength = 0;
|
||||
uint8_t input[3];
|
||||
uint8_t output[4];
|
||||
Index: tmux-1.6/tty.c
|
||||
===================================================================
|
||||
--- tmux-1.6.orig/tty.c
|
||||
+++ tmux-1.6/tty.c
|
||||
@@ -1006,7 +1006,7 @@ tty_cmd_setselection(struct tty *tty, co
|
||||
off = 4 * ((ctx->num + 2) / 3) + 1; /* storage for base64 */
|
||||
buf = xmalloc(off);
|
||||
|
||||
- b64_ntop(ctx->ptr, ctx->num, buf, off);
|
||||
+ local_b64_ntop(ctx->ptr, ctx->num, buf, off);
|
||||
tty_putcode_ptr2(tty, TTYC_MS, "", buf);
|
||||
|
||||
xfree(buf);
|
Loading…
x
Reference in New Issue
Block a user