diff -ubr mysql-shell-9.6.0-src.orig/ext/linenoise-ng/src/linenoise.cpp mysql-shell-9.6.0-src/ext/linenoise-ng/src/linenoise.cpp --- mysql-shell-9.6.0-src.orig/ext/linenoise-ng/src/linenoise.cpp 2026-01-05 15:18:55.000000000 +0100 +++ mysql-shell-9.6.0-src/ext/linenoise-ng/src/linenoise.cpp 2026-01-24 13:33:37.284976000 +0100 @@ -84,6 +84,7 @@ * */ +#include #ifdef _WIN32 #include diff -ubr mysql-shell-9.6.0-src.orig/modules/util/upgrade_checker/upgrade_check_options.cc mysql-shell-9.6.0-src/modules/util/upgrade_checker/upgrade_check_options.cc --- mysql-shell-9.6.0-src.orig/modules/util/upgrade_checker/upgrade_check_options.cc 2026-01-05 15:18:55.000000000 +0100 +++ mysql-shell-9.6.0-src/modules/util/upgrade_checker/upgrade_check_options.cc 2026-01-24 13:40:57.690427000 +0100 @@ -137,13 +137,12 @@ "Check timeout must be non-zero, positive value"); } constexpr auto max_seconds = - std::chrono::duration_cast( + std::chrono::duration_cast( std::chrono::steady_clock::duration::max()) .count(); if (check_timeout.has_value() && *check_timeout > max_seconds) { throw std::invalid_argument(shcore::str_format( - "Check timeout value is bigger than supported value %" PRId64, - max_seconds)); + "Check timeout value is bigger than supported value")); } } Only in mysql-shell-9.6.0-src/mysqlshdk/libs/db/mysqlx: xpl_error.h diff -ubr mysql-shell-9.6.0-src.orig/mysqlshdk/libs/ssh/ssh_tunnel_handler.cc mysql-shell-9.6.0-src/mysqlshdk/libs/ssh/ssh_tunnel_handler.cc --- mysql-shell-9.6.0-src.orig/mysqlshdk/libs/ssh/ssh_tunnel_handler.cc 2026-01-05 15:18:55.000000000 +0100 +++ mysql-shell-9.6.0-src/mysqlshdk/libs/ssh/ssh_tunnel_handler.cc 2026-01-24 12:59:04.084519000 +0100 @@ -28,6 +28,9 @@ #include #include #include +#include +#include +#include #include "mysqlshdk/libs/utils/logger.h" #ifndef MSG_NOSIGNAL diff -ubr mysql-shell-9.6.0-src.orig/mysqlshdk/libs/utils/logger.cc mysql-shell-9.6.0-src/mysqlshdk/libs/utils/logger.cc --- mysql-shell-9.6.0-src.orig/mysqlshdk/libs/utils/logger.cc 2026-01-05 15:18:55.000000000 +0100 +++ mysql-shell-9.6.0-src/mysqlshdk/libs/utils/logger.cc 2026-01-24 12:40:31.556882000 +0100 @@ -38,6 +38,7 @@ #include #else // !_WIN32 #include +#include #include #include #include diff -ubr mysql-shell-9.6.0-src.orig/mysqlshdk/libs/utils/utils_file.cc mysql-shell-9.6.0-src/mysqlshdk/libs/utils/utils_file.cc --- mysql-shell-9.6.0-src.orig/mysqlshdk/libs/utils/utils_file.cc 2026-01-05 15:18:55.000000000 +0100 +++ mysql-shell-9.6.0-src/mysqlshdk/libs/utils/utils_file.cc 2026-01-24 12:54:09.147172000 +0100 @@ -67,7 +67,7 @@ #ifdef __sun #include #else -#include +#include #endif #endif #endif @@ -412,8 +412,8 @@ struct stat file_stat = {}; const auto ret = ::stat(path, &file_stat); #else - struct stat64 file_stat = {}; - const auto ret = stat64(path, &file_stat); + struct stat file_stat = {}; + const auto ret = stat(path, &file_stat); #endif if (0 != ret) { diff -ubr mysql-shell-9.6.0-src.orig/mysqlshdk/libs/utils/utils_general.cc mysql-shell-9.6.0-src/mysqlshdk/libs/utils/utils_general.cc --- mysql-shell-9.6.0-src.orig/mysqlshdk/libs/utils/utils_general.cc 2026-01-05 15:18:55.000000000 +0100 +++ mysql-shell-9.6.0-src/mysqlshdk/libs/utils/utils_general.cc 2026-01-24 13:12:14.427037000 +0100 @@ -25,6 +25,7 @@ #include "mysqlshdk/libs/utils/utils_general.h" +#include #include #include #include @@ -240,16 +241,11 @@ #define strerror_r(E, B, S) strerror_s(B, S, E) #endif -#if defined(_WIN32) || defined(__sun) || defined(__APPLE__) || \ - ((_POSIX_C_SOURCE >= 200112L || _XOPEN_SOURCE >= 600) && \ - !_GNU_SOURCE) // NOLINT char buf[256]; if (!strerror_r(err, buf, sizeof(buf))) return std::string(buf); return std::string(); -#else - char buf[256]; - return strerror_r(err, buf, sizeof(buf)); -#endif +/* char buf[256]; + return strerror_r(err, buf, sizeof(buf)); */ } std::vector split_string(std::string_view input, @@ -1025,6 +1021,8 @@ os = OperatingSystem::MACOS; #elif __sun os = OperatingSystem::SOLARIS; +#elif __FreeBSD__ + os = OperatingSystem::FREEBSD; #elif __linux__ os = OperatingSystem::LINUX; @@ -1094,6 +1092,8 @@ return "macos"; case OperatingSystem::SOLARIS: return "solaris"; + case OperatingSystem::FREEBSD: + return "freebsd"; default: assert(0); return "unknown"; diff -ubr mysql-shell-9.6.0-src.orig/mysqlshdk/libs/utils/utils_general.h mysql-shell-9.6.0-src/mysqlshdk/libs/utils/utils_general.h --- mysql-shell-9.6.0-src.orig/mysqlshdk/libs/utils/utils_general.h 2026-01-05 15:18:55.000000000 +0100 +++ mysql-shell-9.6.0-src/mysqlshdk/libs/utils/utils_general.h 2026-01-24 13:08:02.380006000 +0100 @@ -172,7 +172,8 @@ LINUX, WINDOWS_OS, // WINDOWS conflicts with a zlib #define MACOS, - SOLARIS + SOLARIS, + FREEBSD }; std::string SHCORE_PUBLIC to_string(OperatingSystem os_type); diff -ubr mysql-shell-9.6.0-src.orig/mysqlshdk/libs/utils/utils_net.cc mysql-shell-9.6.0-src/mysqlshdk/libs/utils/utils_net.cc --- mysql-shell-9.6.0-src.orig/mysqlshdk/libs/utils/utils_net.cc 2026-01-05 15:18:55.000000000 +0100 +++ mysql-shell-9.6.0-src/mysqlshdk/libs/utils/utils_net.cc 2026-01-24 13:13:22.544207000 +0100 @@ -25,6 +25,8 @@ #include "mysqlshdk/libs/utils/utils_net.h" +#include + #ifdef _WIN32 // clang-format off #include diff -ubr mysql-shell-9.6.0-src.orig/mysqlshdk/libs/utils/utils_os.cc mysql-shell-9.6.0-src/mysqlshdk/libs/utils/utils_os.cc --- mysql-shell-9.6.0-src.orig/mysqlshdk/libs/utils/utils_os.cc 2026-01-05 15:18:55.000000000 +0100 +++ mysql-shell-9.6.0-src/mysqlshdk/libs/utils/utils_os.cc 2026-01-24 13:20:07.523624000 +0100 @@ -37,7 +37,6 @@ #include #else #include -#include #include #endif @@ -62,7 +61,7 @@ (host_info64_t)&vm_stats, &count)) { return static_cast(vm_stats.free_count) * page_size; } -#else +#elif __linux struct sysinfo info; if (0 == sysinfo(&info)) { diff -ubr mysql-shell-9.6.0-src.orig/mysqlshdk/libs/utils/uuid_gen.cc mysql-shell-9.6.0-src/mysqlshdk/libs/utils/uuid_gen.cc --- mysql-shell-9.6.0-src.orig/mysqlshdk/libs/utils/uuid_gen.cc 2026-01-05 15:18:55.000000000 +0100 +++ mysql-shell-9.6.0-src/mysqlshdk/libs/utils/uuid_gen.cc 2026-01-24 13:30:53.558094000 +0100 @@ -168,7 +168,7 @@ char zero_array[ETHER_ADDR_LEN] = {0}; if (sysctl(mib, 6, NULL, &len, NULL, 0) == -1) goto err; - if (!(buf = alloca(len))) goto err; + buf = (char *)malloc(len); if (sysctl(mib, 6, buf, &len, NULL, 0) < 0) goto err; end = buf + len;