Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 6 May 2018 19:23:25 +0000 (UTC)
From:      Bernard Spil <brnrd@FreeBSD.org>
To:        ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org
Subject:   svn commit: r469246 - in head/databases/mariadb102-server: . files
Message-ID:  <201805061923.w46JNP3f052715@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: brnrd
Date: Sun May  6 19:23:25 2018
New Revision: 469246
URL: https://svnweb.freebsd.org/changeset/ports/469246

Log:
  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

Added:
  head/databases/mariadb102-server/files/patch-MDEV-15768   (contents, props changed)
  head/databases/mariadb102-server/files/patch-MDEV-15961   (contents, props changed)
Modified:
  head/databases/mariadb102-server/Makefile

Modified: head/databases/mariadb102-server/Makefile
==============================================================================
--- head/databases/mariadb102-server/Makefile	Sun May  6 19:08:25 2018	(r469245)
+++ head/databases/mariadb102-server/Makefile	Sun May  6 19:23:25 2018	(r469246)
@@ -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

Added: head/databases/mariadb102-server/files/patch-MDEV-15768
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/databases/mariadb102-server/files/patch-MDEV-15768	Sun May  6 19:23:25 2018	(r469246)
@@ -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:

Added: head/databases/mariadb102-server/files/patch-MDEV-15961
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/databases/mariadb102-server/files/patch-MDEV-15961	Sun May  6 19:23:25 2018	(r469246)
@@ -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))
+   {



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201805061923.w46JNP3f052715>