Created
May 29, 2019 17:28
-
-
Save sergeycherepanov/e22cd49c4e4488be7a2dbac3518bfcda to your computer and use it in GitHub Desktop.
percona-server-57/patches/10-memset_s.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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