diff options
author | brnrd <brnrd@FreeBSD.org> | 2018-05-07 03:23:25 +0800 |
---|---|---|
committer | brnrd <brnrd@FreeBSD.org> | 2018-05-07 03:23:25 +0800 |
commit | 0f5bdc8e78a3ba0552238648a2bef5005d20217d (patch) | |
tree | e7988b3e09832d7c16c6299a0805e862a317b805 /databases/mariadb102-server | |
parent | 71bc5cb78151c47c16a1ff63ea9940b7222c6fca (diff) | |
download | freebsd-ports-gnome-0f5bdc8e78a3ba0552238648a2bef5005d20217d.tar.gz freebsd-ports-gnome-0f5bdc8e78a3ba0552238648a2bef5005d20217d.tar.zst freebsd-ports-gnome-0f5bdc8e78a3ba0552238648a2bef5005d20217d.zip |
databases/mariadb102-server: Fix builds
- Fix build on aarch64 [1]
- Fix build with clang6 (HEAD, 11-STABLE) [2]
PR: 227628 [1], 227244 [2]
Submitted by: Naram Qashat <cyberbotx cyberbotx com> [1]
Submitted by: dim
Diffstat (limited to 'databases/mariadb102-server')
-rw-r--r-- | databases/mariadb102-server/Makefile | 2 | ||||
-rw-r--r-- | databases/mariadb102-server/files/patch-MDEV-15768 | 63 | ||||
-rw-r--r-- | databases/mariadb102-server/files/patch-MDEV-15961 | 47 |
3 files changed, 110 insertions, 2 deletions
diff --git a/databases/mariadb102-server/Makefile b/databases/mariadb102-server/Makefile index b12b5f795c72..6f6c49c8ee21 100644 --- a/databases/mariadb102-server/Makefile +++ b/databases/mariadb102-server/Makefile @@ -22,8 +22,6 @@ LICENSE_NAME_PerconaFT= PerconaFT patents license LICENSE_FILE_PerconaFT= ${WRKSRC}/storage/tokudb/PerconaFT/PATENTS LICENSE_PERMS_PerconaFT= dist-mirror dist-sell pkg-mirror pkg-sell auto-accept -BROKEN_aarch64= fails to link: stacktrace.c: undefined reference to 'sbrk' - SUB_FILES= pkg-message SLAVEDIRS= databases/mariadb102-client diff --git a/databases/mariadb102-server/files/patch-MDEV-15768 b/databases/mariadb102-server/files/patch-MDEV-15768 new file mode 100644 index 000000000000..bc4e6cabed7e --- /dev/null +++ b/databases/mariadb102-server/files/patch-MDEV-15768 @@ -0,0 +1,63 @@ +--- storage/connect/tabjson.cpp.orig 2018-03-26 16:41:19 UTC ++++ storage/connect/tabjson.cpp +@@ -195,7 +195,7 @@ int JSONDISC::GetColumns(PGLOBAL g, PCSZ + tdp->Fn = GetStringTableOption(g, topt, "Filename", NULL); + + if (!(tdp->Database = SetPath(g, db))) +- return NULL; ++ return 0; + + tdp->Objname = GetStringTableOption(g, topt, "Object", NULL); + tdp->Base = GetIntegerTableOption(g, topt, "Base", 0) ? 1 : 0; +@@ -243,14 +243,14 @@ int JSONDISC::GetColumns(PGLOBAL g, PCSZ + tjsp = new(g) TDBJSON(tdp, new(g) MAPFAM(tdp)); + + if (tjsp->MakeDocument(g)) +- return NULL; ++ return 0; + + jsp = (tjsp->GetDoc()) ? tjsp->GetDoc()->GetValue(0) : NULL; + } else { + if (!(tdp->Lrecl = GetIntegerTableOption(g, topt, "Lrecl", 0))) + if (!mgo) { + sprintf(g->Message, "LRECL must be specified for pretty=%d", tdp->Pretty); +- return NULL; ++ return 0; + } else + tdp->Lrecl = 8192; // Should be enough + +@@ -269,14 +269,14 @@ int JSONDISC::GetColumns(PGLOBAL g, PCSZ + tjnp = new(g) TDBJSN(tdp, new(g) CMGFAM(tdp)); + #else + sprintf(g->Message, "Mongo %s Driver not available", "C"); +- return NULL; ++ return 0; + #endif + } else if (tdp->Driver && toupper(*tdp->Driver) == 'J') { + #if defined(JAVA_SUPPORT) + tjnp = new(g) TDBJSN(tdp, new(g) JMGFAM(tdp)); + #else + sprintf(g->Message, "Mongo %s Driver not available", "Java"); +- return NULL; ++ return 0; + #endif + } else { // Driver not specified + #if defined(CMGO_SUPPORT) +@@ -285,7 +285,7 @@ int JSONDISC::GetColumns(PGLOBAL g, PCSZ + tjnp = new(g) TDBJSN(tdp, new(g) JMGFAM(tdp)); + #else + sprintf(g->Message, MSG(NO_FEAT_SUPPORT), "MONGO"); +- return NULL; ++ return 0; + #endif + } // endif Driver + +@@ -304,7 +304,7 @@ int JSONDISC::GetColumns(PGLOBAL g, PCSZ + tjnp->SetG(G); + + if (tjnp->OpenDB(g)) +- return NULL; ++ return 0; + + switch (tjnp->ReadDB(g)) { + case RC_EF: diff --git a/databases/mariadb102-server/files/patch-MDEV-15961 b/databases/mariadb102-server/files/patch-MDEV-15961 new file mode 100644 index 000000000000..12854f191894 --- /dev/null +++ b/databases/mariadb102-server/files/patch-MDEV-15961 @@ -0,0 +1,47 @@ +--- mysys/stacktrace.c.orig 2018-03-26 16:41:18 UTC ++++ mysys/stacktrace.c +@@ -34,19 +34,19 @@ + #include <execinfo.h> + #endif + ++#ifdef __linux__ + #define PTR_SANE(p) ((p) && (char*)(p) >= heap_start && (char*)(p) <= heap_end) +- + static char *heap_start; +- +-#if(defined HAVE_BSS_START) && !(defined __linux__) + extern char *__bss_start; +-#endif ++#else ++#define PTR_SANE(p) (p) ++#endif /* __linux */ + + void my_init_stacktrace() + { +-#if(defined HAVE_BSS_START) && !(defined __linux__) ++#ifdef __linux__ + heap_start = (char*) &__bss_start; +-#endif ++#endif /* __linux__ */ + } + + #ifdef __linux__ +@@ -149,15 +149,16 @@ static int safe_print_str(const char *ad + + int my_safe_print_str(const char* val, int max_len) + { ++#ifdef __linux__ ++/* Only needed by the linux version of PTR_SANE */ + char *heap_end; + +-#ifdef __linux__ + // Try and make use of /proc filesystem to safely print memory contents. + if (!safe_print_str(val, max_len)) + return 0; +-#endif + + heap_end= (char*) sbrk(0); ++#endif + + if (!PTR_SANE(val)) + { |