Browse Source
* build-package.sh: add possibility for debug patches and TERMUX_PKG_HAS_DEBUG Setting TERMUX_PKG_HAS_DEBUG=no disables attempt to build debug build of package. Useful for example if a debug build doesn't make sense, as for python-packages and texlive. * aapt: skip D_FORTIFY_SOURCE=2 for libandroid-cutils when doing debug build * lftp: skip D_FORTIFY_SOURCE=2 for debug build * libflac: don't use -g3 for debug build Configure script removes it otherwise. * nano: skip -D_FORTIFY_SOURCE=2 for debug build * vifm: skip -D_FORTIFY_SOURCE=2 for debug build * mc: skip -D_FORTIFY_SOURCE=2 for debug build * dropbear: add __attribute__((overloadable)) to XMEMSET and XMEMCPY if debug * gdb: add __attribute__((overloadable)) to strchr if debug * gnuit: add __attribute__((overloadable)) to strchr and strcpy if debug * gperf: add __attribute__((overloadable)) to strlen if debug * inetutils: add __attribute__((overloadable)) to strrchr and strchr if debug * readline: add __attribute__((overloadable)) to strchr if debug * tsocks: add __attribute__((overloadable)) to poll if debug * units: add __attribute__((overloadable)) to strchr if debug * liblua: fix bug in loslib.c that emerged in debug build Use strncpy instead of strcpy. Original error message: loslib.c:169:3: error: 'strcpy' called with string bigger than buffer lua_tmpnam(buff, err); ^ loslib.c:122:37: note: expanded from macro 'lua_tmpnam' strcpy(b, LUA_TMPNAMTEMPLATE); \ ^ * alpine: include our getpass.h in imap's mtest.c to declare getpass Debug build complained about the previous implicit declaration. * nginx: use --with-debug instead of --debug * cboard: skip -D_FORTIFY_SOURCE=2 for debug build * gettext: add __attribute__((overloadable)) to getcwd if debug * oathtool: skip -D_FORTIFY_SOURCE=2 for debug build * php: add __attribute__((overloadable)) to strlcpy and strlcat if debug * expect: add __attribute__((overloadable)) to strchr if debug * texlive: set TERMUX_PKG_HAS_DEBUG=no * asciinema: set TERMUX_PKG_HAS_DEBUG=no * libllvm: set TERMUX_PKG_HAS_DEBUG=no Debug build fails with: home/builder/.termux-build/libllvm/src/lib/Support/Unix/Path.inc:740:19: error: no matching function for call to 'RetryAfterSignal' if ((ResultFD = sys::RetryAfterSignal(-1, open, P.begin(), OpenFlags)) < 0) * build-package.sh: set TERMUX_PKG_REPLACES=package if debug build Hopefully allows us to install debug packages without breaking dependecies. Should be looked over and be made more similar to how debian does this in any case * Update build.shandroid-5
Henrik Grimler
7 years ago
committed by
Fredrik Fornwall
26 changed files with 291 additions and 4 deletions
@ -0,0 +1,10 @@ |
|||||
|
--- ./imap/src/mtest/mtest.c 2018-03-21 20:56:14.145999441 +0000
|
||||
|
+++ ../mtest.c 2018-03-21 21:23:34.179966620 +0000
|
||||
|
@@ -34,6 +34,7 @@
|
||||
|
#include <signal.h> |
||||
|
#include "c-client.h" |
||||
|
#include "imap4r1.h" |
||||
|
+#include "../../include/getpass.h"
|
||||
|
|
||||
|
/* Excellent reasons to hate ifdefs, and why my real code never uses them */ |
||||
|
|
@ -0,0 +1,14 @@ |
|||||
|
--- ./libtomcrypt/src/headers/tomcrypt_cfg.h 2017-05-18 14:47:02.000000000 +0000 |
||||
|
+++ ../tomcrypt_cfg.h 2018-03-17 08:49:37.958092137 +0000 |
||||
|
@@ -35,9 +35,9 @@ |
||||
|
LTC_EXPORT clock_t LTC_CALL XCLOCK(void); |
||||
|
|
||||
|
/* various other functions */ |
||||
|
-LTC_EXPORT void * LTC_CALL XMEMCPY(void *dest, const void *src, size_t n); |
||||
|
+LTC_EXPORT void * LTC_CALL __attribute__((overloadable)) XMEMCPY(void *dest, const void *src, size_t n); |
||||
|
LTC_EXPORT int LTC_CALL XMEMCMP(const void *s1, const void *s2, size_t n); |
||||
|
-LTC_EXPORT void * LTC_CALL XMEMSET(void *s, int c, size_t n); |
||||
|
+LTC_EXPORT void * LTC_CALL __attribute__((overloadable)) XMEMSET(void *s, int c, size_t n); |
||||
|
|
||||
|
LTC_EXPORT int LTC_CALL XSTRCMP(const char *s1, const char *s2); |
||||
|
|
@ -0,0 +1,11 @@ |
|||||
|
--- ./exp_strf.c 2000-01-06 23:22:05.000000000 +0000 |
||||
|
+++ ../exp_strf.c 2018-03-22 19:58:34.428090961 +0000 |
||||
|
@@ -99,7 +99,7 @@ |
||||
|
#else |
||||
|
|
||||
|
#ifndef strchr |
||||
|
-extern char *strchr(const char *str, int ch); |
||||
|
+extern char __attribute__((overloadable)) *strchr(const char *str, int ch); |
||||
|
#endif |
||||
|
|
||||
|
extern char *getenv(const char *v); |
@ -0,0 +1,11 @@ |
|||||
|
--- ./readline/histlib.h 2017-06-04 15:51:27.000000000 +0000 |
||||
|
+++ ../histlib.h 2018-03-21 15:09:37.286670845 +0000 |
||||
|
@@ -52,7 +52,7 @@ |
||||
|
|
||||
|
#ifndef member |
||||
|
# ifndef strchr |
||||
|
-extern char *strchr (); |
||||
|
+extern char __attribute__((overloadable)) *strchr (); |
||||
|
# endif |
||||
|
#define member(c, s) ((c) ? ((char *)strchr ((s), (c)) != (char *)NULL) : 0) |
||||
|
#endif |
@ -0,0 +1,11 @@ |
|||||
|
--- ./gettext-runtime/intl/dcigettext.c 2016-05-19 06:49:42.000000000 +0000 |
||||
|
+++ ../dcigettext.c 2018-03-22 06:18:22.714946338 +0000 |
||||
|
@@ -144,7 +144,7 @@ |
||||
|
# if VMS |
||||
|
# define getcwd(buf, max) (getcwd) (buf, max, 0) |
||||
|
# else |
||||
|
-char *getcwd (); |
||||
|
+char __attribute__((overloadable)) *getcwd (); |
||||
|
# endif |
||||
|
# endif |
||||
|
# ifndef HAVE_STPCPY |
@ -0,0 +1,31 @@ |
|||||
|
--- ./src/tilde.c 2009-02-18 02:31:26.000000000 +0000 |
||||
|
+++ ../tilde.c 2018-03-17 21:38:36.637958669 +0000 |
||||
|
@@ -47,7 +47,7 @@ |
||||
|
|
||||
|
#if !defined (savestring) |
||||
|
# ifndef strcpy |
||||
|
-extern char *strcpy (); |
||||
|
+extern char __attribute__((overloadable)) *strcpy (); |
||||
|
# endif |
||||
|
#define savestring(x) strcpy (xmalloc (1 + strlen (x)), (x)) |
||||
|
#endif /* !savestring */ |
||||
|
--- ./src/history.c 2009-02-18 02:31:26.000000000 +0000 |
||||
|
+++ ../history.c 2018-03-17 21:38:21.789964199 +0000 |
||||
|
@@ -61,7 +61,7 @@ |
||||
|
|
||||
|
#ifndef savestring |
||||
|
# ifndef strcpy |
||||
|
-extern char *strcpy (); |
||||
|
+extern char __attribute__((overloadable)) *strcpy (); |
||||
|
# endif |
||||
|
#define savestring(x) strcpy (xmalloc (1 + strlen (x)), (x)) |
||||
|
#endif |
||||
|
@@ -80,7 +80,7 @@ |
||||
|
|
||||
|
#ifndef member |
||||
|
# ifndef strchr |
||||
|
-extern char *strchr (); |
||||
|
+extern char __attribute__((overloadable)) *strchr (); |
||||
|
# endif |
||||
|
#define member(c, s) ((c) ? ((char *)strchr ((s), (c)) != (char *)NULL) : 0) |
||||
|
#endif |
@ -0,0 +1,11 @@ |
|||||
|
--- ./lib/getopt.c 2017-01-02 11:35:39.000000000 +0000 |
||||
|
+++ ../getopt.c 2018-03-01 10:44:56.641412033 +0000 |
||||
|
@@ -210,7 +210,7 @@ |
||||
|
} |
||||
|
|
||||
|
extern int strcmp (const char *, const char *); |
||||
|
-extern size_t strlen (const char *); |
||||
|
+extern size_t __attribute__((overloadable)) strlen (const char *); |
||||
|
|
||||
|
#endif /* not __GNU_LIBRARY__ */ |
||||
|
|
@ -0,0 +1,20 @@ |
|||||
|
--- ./telnet/commands.c 2015-03-31 15:40:50.000000000 +0000 |
||||
|
+++ ../commands.c 2018-03-21 15:24:39.867877463 +0000 |
||||
|
@@ -1584,7 +1584,7 @@ |
||||
|
*/ |
||||
|
register char *shellp, *shellname; |
||||
|
# ifndef strrchr |
||||
|
- extern char *strrchr (const char *, int); |
||||
|
+ extern char __attribute__((overloadable)) *strrchr (const char *, int); |
||||
|
# endif |
||||
|
|
||||
|
shellp = getenv ("SHELL"); |
||||
|
@@ -1881,7 +1881,7 @@ |
||||
|
register char **epp, *cp; |
||||
|
register struct env_lst *ep; |
||||
|
#ifndef strchr |
||||
|
- extern char *strchr (const char *, int); |
||||
|
+ extern char __attribute__((overloadable)) *strchr (const char *, int); |
||||
|
#endif |
||||
|
|
||||
|
for (epp = environ; *epp; epp++) |
@ -0,0 +1,22 @@ |
|||||
|
--- ./src/loslib.c 2017-11-18 15:51:35.425137997 +0000
|
||||
|
+++ ../loslib.c 2017-11-18 16:20:36.202578294 +0000
|
||||
|
@@ -118,8 +118,8 @@
|
||||
|
#define LUA_TMPNAMTEMPLATE "/data/data/com.termux/files/usr/tmp/lua_XXXXXX" |
||||
|
#endif |
||||
|
|
||||
|
-#define lua_tmpnam(b,e) { \
|
||||
|
- strcpy(b, LUA_TMPNAMTEMPLATE); \
|
||||
|
+#define lua_tmpnam(b,e,s) { \
|
||||
|
+ strncpy(b, LUA_TMPNAMTEMPLATE, s); \
|
||||
|
e = mkstemp(b); \ |
||||
|
if (e != -1) close(e); \ |
||||
|
e = (e == -1); } |
||||
|
@@ -166,7 +166,7 @@
|
||||
|
static int os_tmpname (lua_State *L) { |
||||
|
char buff[LUA_TMPNAMBUFSIZE]; |
||||
|
int err; |
||||
|
- lua_tmpnam(buff, err);
|
||||
|
+ lua_tmpnam(buff, err, LUA_TMPNAMBUFSIZE - 1);
|
||||
|
if (err) |
||||
|
return luaL_error(L, "unable to generate a unique filename"); |
||||
|
lua_pushstring(L, buff); |
@ -0,0 +1,15 @@ |
|||||
|
--- ./ext/fileinfo/libmagic/file.h 2018-02-27 16:33:03.000000000 +0000 |
||||
|
+++ ../file.h 2018-03-22 19:36:35.759933435 +0000 |
||||
|
@@ -511,10 +511,10 @@ |
||||
|
#endif |
||||
|
|
||||
|
#ifndef strlcpy |
||||
|
-size_t strlcpy(char *, const char *, size_t); |
||||
|
+size_t __attribute__((overloadable)) strlcpy(char *, const char *, size_t); |
||||
|
#endif |
||||
|
#ifndef strlcat |
||||
|
-size_t strlcat(char *, const char *, size_t); |
||||
|
+size_t __attribute__((overloadable)) strlcat(char *, const char *, size_t); |
||||
|
#endif |
||||
|
#ifndef HAVE_STRCASESTR |
||||
|
char *strcasestr(const char *, const char *); |
@ -0,0 +1,11 @@ |
|||||
|
--- ./histlib.h 2016-04-22 15:03:20.000000000 +0000 |
||||
|
+++ ../histlib.h 2018-03-18 19:50:23.834494092 +0000 |
||||
|
@@ -52,7 +52,7 @@ |
||||
|
|
||||
|
#ifndef member |
||||
|
# ifndef strchr |
||||
|
-extern char *strchr (); |
||||
|
+extern char __attribute__((overloadable)) *strchr (); |
||||
|
# endif |
||||
|
#define member(c, s) ((c) ? ((char *)strchr ((s), (c)) != (char *)NULL) : 0) |
||||
|
#endif |
@ -0,0 +1,33 @@ |
|||||
|
--- ./configure 2018-03-01 11:48:24.972390791 +0000 |
||||
|
+++ ../configure 2018-03-01 12:17:17.702571991 +0000 |
||||
|
@@ -2283,7 +2283,7 @@ |
||||
|
#include "confdefs.h" |
||||
|
|
||||
|
#include <sys/poll.h> |
||||
|
- int poll($testproto); |
||||
|
+ int __attribute__((overloadable)) poll($testproto); |
||||
|
|
||||
|
int main() { |
||||
|
|
||||
|
--- ./tsocks.c 2018-03-01 12:18:42.778500423 +0000 |
||||
|
+++ ../tsocks.c 2018-03-01 12:19:31.726457927 +0000 |
||||
|
@@ -72,7 +72,7 @@ |
||||
|
void _init(void); |
||||
|
int connect(CONNECT_SIGNATURE); |
||||
|
int select(SELECT_SIGNATURE); |
||||
|
-int poll(POLL_SIGNATURE); |
||||
|
+int __attribute__((overloadable)) poll(POLL_SIGNATURE); |
||||
|
int close(CLOSE_SIGNATURE); |
||||
|
int getpeername(GETPEERNAME_SIGNATURE); |
||||
|
#ifdef USE_SOCKS_DNS |
||||
|
--- ./tsocks.c 2018-03-01 12:21:27.198354152 +0000 |
||||
|
+++ ../tsocks.c 2018-03-01 12:21:59.098324662 +0000 |
||||
|
@@ -538,7 +538,7 @@ |
||||
|
return(nevents); |
||||
|
} |
||||
|
|
||||
|
-int poll(POLL_SIGNATURE) { |
||||
|
+int __attribute__((overloadable)) poll(POLL_SIGNATURE) { |
||||
|
int nevents = 0; |
||||
|
int rc = 0, i; |
||||
|
int setevents = 0; |
@ -0,0 +1,11 @@ |
|||||
|
--- ./units.h 2017-02-09 21:43:12.000000000 +0000 |
||||
|
+++ ../units.h 2018-03-21 20:22:04.544833906 +0000 |
||||
|
@@ -54,7 +54,7 @@ |
||||
|
# ifdef NO_STRCHR |
||||
|
# define strchr(a,b) index((a),(b)) |
||||
|
# else |
||||
|
- char *strchr(); |
||||
|
+ char __attribute__((overloadable)) *strchr(); |
||||
|
# endif |
||||
|
#endif /* !strchr */ |
||||
|
|
Loading…
Reference in new issue