mysql-shell: fix build on darwin (#523285)
This commit is contained in:
@@ -77,7 +77,7 @@ stdenv.mkDerivation (finalAttrs: {
|
||||
|
||||
env =
|
||||
lib.optionalAttrs stdenv.cc.isClang {
|
||||
NIX_CFLAGS_COMPILE = "-Wno-error=deprecated-literal-operator";
|
||||
NIX_CFLAGS_COMPILE = "-Wno-error=deprecated-literal-operator -Wno-error=nonnull";
|
||||
}
|
||||
// lib.optionalAttrs stdenv.cc.isGNU {
|
||||
NIX_CFLAGS_COMPILE = "-Wno-error=array-bounds";
|
||||
|
||||
@@ -73,6 +73,10 @@ stdenv.mkDerivation (finalAttrs: {
|
||||
substituteInPlace ../mysql/cmake/os/Darwin.cmake --replace-fail /usr/bin/libtool libtool
|
||||
|
||||
substituteInPlace cmake/libutils.cmake --replace-fail /usr/bin/libtool libtool
|
||||
|
||||
${lib.optionalString stdenv.hostPlatform.isDarwin ''
|
||||
patch -d .. -p1 < ${./mysql-server-libcxx-21.patch}
|
||||
''}
|
||||
'';
|
||||
|
||||
strictDeps = true;
|
||||
|
||||
@@ -73,6 +73,10 @@ stdenv.mkDerivation (finalAttrs: {
|
||||
substituteInPlace ../mysql/cmake/os/Darwin.cmake --replace-fail /usr/bin/libtool libtool
|
||||
|
||||
substituteInPlace cmake/libutils.cmake --replace-fail /usr/bin/libtool libtool
|
||||
|
||||
${lib.optionalString stdenv.hostPlatform.isDarwin ''
|
||||
patch -d .. -p1 < ${./mysql-server-libcxx-21.patch}
|
||||
''}
|
||||
'';
|
||||
|
||||
nativeBuildInputs = [
|
||||
|
||||
@@ -0,0 +1,22 @@
|
||||
diff --git a/mysql/libs/mysql/gtid/tag_plain.h b/mysql/libs/mysql/gtid/tag_plain.h
|
||||
index 4703a5b0d6e..914c6a4b777 100644
|
||||
--- a/mysql/libs/mysql/gtid/tag_plain.h
|
||||
+++ b/mysql/libs/mysql/gtid/tag_plain.h
|
||||
@@ -28,6 +28,7 @@
|
||||
#include <cstring>
|
||||
#include <memory>
|
||||
#include <string>
|
||||
+#include <type_traits>
|
||||
|
||||
#include "mysql/gtid/gtid_constants.h" // tag_max_length
|
||||
|
||||
@@ -80,7 +81,8 @@ struct Tag_plain {
|
||||
unsigned char m_data[tag_max_length + 1];
|
||||
};
|
||||
|
||||
-static_assert(std::is_trivial_v<Tag_plain>);
|
||||
+static_assert(std::is_trivially_copyable_v<Tag_plain>);
|
||||
+static_assert(std::is_trivially_default_constructible_v<Tag_plain>);
|
||||
static_assert(std::is_standard_layout_v<Tag_plain>);
|
||||
|
||||
} // namespace mysql::gtid
|
||||
Reference in New Issue
Block a user