Răsfoiți Sursa

add: 添加LUAT_COMPILER_NOWEAK, 尝试解决一些平台不支持weak编译的问题

Wendal Chen 4 ani în urmă
părinte
comite
3c9633b6e3
1 a modificat fișierele cu 3 adăugiri și 1 ștergeri
  1. 3 1
      luat/modules/luat_lib_crypto.c

+ 3 - 1
luat/modules/luat_lib_crypto.c

@@ -392,7 +392,7 @@ LUAMOD_API int luaopen_crypto( lua_State *L ) {
 }
 
 // 添加几个默认实现
-
+#ifndef LUAT_COMPILER_NOWEAK
 LUAT_WEAK int luat_crypto_md5_simple(const char* str, size_t str_size, void* out_ptr) {return -1;}
 LUAT_WEAK int luat_crypto_hmac_md5_simple(const char* str, size_t str_size, const char* mac, size_t mac_size, void* out_ptr) {return -1;}
 
@@ -409,3 +409,5 @@ LUAT_WEAK int luat_crypto_trng(char* buff, size_t len) {
     memset(buff, 0, len);
     return 0;
 }
+
+#endif