It seems the arguments sometimes overlap, and _FORTIFY_SOURCE=2 causes it to dump core in this case. Bump PKGREVISION.
31 lines
1,000 B
Text
31 lines
1,000 B
Text
$NetBSD: patch-ai,v 1.3 2015/08/12 22:20:00 wiz Exp $
|
|
|
|
chunk 1:
|
|
fix build with _FORTIFY_SOURCE=2; it seems the arguments sometimes
|
|
overlap.
|
|
|
|
chunk 2:
|
|
replace BSD/Linux specific "qd" printf format specifier by "lld",
|
|
should fix build problem on Solaris reported by Joern Clausen
|
|
per PR pkg/40664
|
|
|
|
--- base/mkromfs.c.orig 2012-08-08 08:01:36.000000000 +0000
|
|
+++ base/mkromfs.c
|
|
@@ -1836,7 +1836,7 @@ ws(const byte *str, int len)
|
|
if (len >= LINE_SIZE)
|
|
exit(1);
|
|
|
|
- memcpy(linebuf, str, len);
|
|
+ memmove(linebuf, str, len);
|
|
flush_line_buf(len);
|
|
}
|
|
|
|
@@ -2178,7 +2178,7 @@ main(int argc, char *argv[])
|
|
#endif
|
|
fprintf(out,"\n#include \"stdint_.h\"\n");
|
|
fprintf(out,"\n#include \"time_.h\"\n\n");
|
|
- fprintf(out," time_t gs_romfs_buildtime = %ld;\n\n", time(NULL));
|
|
+ fprintf(out," time_t gs_romfs_buildtime = %lld;\n\n", (long long)time(NULL));
|
|
|
|
/* process the remaining arguments (options interspersed with paths) */
|
|
for (; atarg < argc; atarg++) {
|