Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save sergeycherepanov/e22cd49c4e4488be7a2dbac3518bfcda to your computer and use it in GitHub Desktop.
Save sergeycherepanov/e22cd49c4e4488be7a2dbac3518bfcda to your computer and use it in GitHub Desktop.
percona-server-57/patches/10-memset_s.patch
From 3779fed6a7668f41fae23a5a338de1a4505b68d4 Mon Sep 17 00:00:00 2001
From: Laurynas Biveinis <laurynas.biveinis@gmail.com>
Date: Mon, 14 Jan 2019 15:13:14 +0200
Subject: [PATCH] Fix PS-5328 (fil0crypt.h:123:7: error: 'memset_s' was not
declared in this scope on illumos)
memset_s in C11 is only guaranteed to be available if
__STDC_LIB_EXT1__ is defined by the implementation and if user defines
__STDC_WANT_LIB_EXT1__, which we didn't do. Thus add the latter define
to CMake default defines, before the feature checks.
---
CMakeLists.txt | 3 +++
1 file changed, 3 insertions(+)
diff --git a/CMakeLists.txt b/CMakeLists.txt
index b9c24eff426..9472de4b21f 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -520,6 +520,9 @@ ELSE()
ENDIF()
ENDIF()
+# Portably get access to memset_s
+ADD_DEFINITIONS(-D__STDC_WANT_LIB_EXT1__=1)
+
# Run platform tests
INCLUDE(configure.cmake)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment