Fix LTO build sandbox/dkson95/LTO
authorDongkyun Son <dongkyun.s@samsung.com>
Tue, 16 Apr 2019 01:50:00 +0000 (10:50 +0900)
committerDongkyun Son <dongkyun.s@samsung.com>
Tue, 16 Apr 2019 01:50:00 +0000 (10:50 +0900)
extlibs/mbedtls/mbedtls/include/mbedtls/error.h
extlibs/mbedtls/mbedtls/library/error.c

index 31591e2..b9cef54 100644 (file)
@@ -89,6 +89,8 @@
 extern "C" {
 #endif
 
+#define EXPORT_SYMBOL __attribute__((visibility("default"),externally_visible))
+
 /**
  * \brief Translate a mbed TLS error code into a string representation,
  *        Result is truncated if necessary and always includes a terminating
index db42381..4cbd84b 100644 (file)
 #endif
 
 
-void mbedtls_strerror( int ret, char *buf, size_t buflen )
+EXPORT_SYMBOL void mbedtls_strerror( int ret, char *buf, size_t buflen )
 {
     size_t len;
     int use_ret;
@@ -696,7 +696,7 @@ void mbedtls_strerror( int ret, char *buf, size_t buflen )
 /*
  * Provide an non-function in case MBEDTLS_ERROR_C is not defined
  */
-void mbedtls_strerror( int ret, char *buf, size_t buflen )
+EXPORT_SYMBOL void mbedtls_strerror( int ret, char *buf, size_t buflen )
 {
     ((void) ret);