Apply a patch from upstream to fix build against gcc 4.7. This fixes

ctemplate-based build failures in mysql-workbench.
This commit is contained in:
Adam Weinberger 2014-08-26 16:50:55 +00:00
parent 772a313bc5
commit a14d108e3c
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=366224
3 changed files with 23 additions and 1 deletions

View file

@ -3,7 +3,7 @@
PORTNAME= google-ctemplate PORTNAME= google-ctemplate
PORTVERSION= 2.2 PORTVERSION= 2.2
PORTREVISION= 2 PORTREVISION= 3
CATEGORIES= textproc CATEGORIES= textproc
MASTER_SITES= GOOGLE_CODE MASTER_SITES= GOOGLE_CODE
PROJECTHOST= ctemplate PROJECTHOST= ctemplate

View file

@ -0,0 +1,11 @@
--- ./src/ctemplate/template_string.h.in.orig 2014-08-26 12:35:28.229739993 -0400
+++ ./src/ctemplate/template_string.h.in 2014-08-26 12:35:50.132984993 -0400
@@ -337,7 +337,7 @@
// Don't use this. This is used only in auto-generated .varnames.h files.
#define STS_INIT_WITH_HASH(name, str, hash) \
- { { str, sizeof(""str"")-1, hash } }; \
+ { { str, sizeof("" str "")-1, hash } }; \
namespace ctemplate_sts_init { \
static const @ac_google_namespace@::StaticTemplateStringInitializer name##_init(&name); \
}

View file

@ -0,0 +1,11 @@
--- ./src/template_dictionary.cc.orig 2014-08-26 12:36:15.829733992 -0400
+++ ./src/template_dictionary.cc 2014-08-26 12:36:37.238772992 -0400
@@ -861,7 +861,7 @@
string GetDictNum(size_t index, size_t size) const {
char buf[64]; // big enough for two ints
- snprintf(buf, sizeof(buf), "%" PRIuS" of %" PRIuS, index, size);
+ snprintf(buf, sizeof(buf), "%" PRIuS " of %" PRIuS, index, size);
return buf;
}