diff --git a/package/tmux/0001-compat-don-t-re-define-program_invocation_short_name.patch b/package/tmux/0001-compat-don-t-re-define-program_invocation_short_name.patch new file mode 100644 index 0000000000..bddc2c720d --- /dev/null +++ b/package/tmux/0001-compat-don-t-re-define-program_invocation_short_name.patch @@ -0,0 +1,42 @@ +From 9b18a98614a9f201b0883c2b15e7c7bde0aa0ff2 Mon Sep 17 00:00:00 2001 +From: "Yann E. MORIN" +Date: Sun, 5 Feb 2017 17:12:00 +0100 +Subject: [PATCH] compat: don't re-define program_invocation_short_name + +program_invocation_short_name is defined in errno.h, and its definition +can differ between the various C libraries: glibc defines it as: + extern char *program_invocation_short_name; + +while uClibc defines it as: + extern const char *program_invocation_short_name; + +So there is not simple solution to know the prototype. + +But since it is defined in errno.h, there is no reason to try and define +it ourselves; let's just trust what the header provides. + +Signed-off-by: "Yann E. MORIN" +--- + compat/getprogname.c | 3 +-- + 1 file changed, 1 insertion(+), 2 deletions(-) + +diff --git a/compat/getprogname.c b/compat/getprogname.c +index 80a496d..ad619fc 100644 +--- a/compat/getprogname.c ++++ b/compat/getprogname.c +@@ -19,11 +19,10 @@ + #include "compat.h" + + #if defined(HAVE_PROGRAM_INVOCATION_SHORT_NAME) ++#include + const char * + getprogname(void) + { +- extern char *program_invocation_short_name; +- + return (program_invocation_short_name); + } + #elif defined(HAVE___PROGNAME) +-- +2.7.4 +