Browse Source

fix: 禁用crypto但启用ota,会导致编译出错

Wendal Chen 3 năm trước cách đây
mục cha
commit
3268636230
1 tập tin đã thay đổi với 2 bổ sung0 xóa
  1. 2 0
      luat/modules/luat_ota.c

+ 2 - 0
luat/modules/luat_ota.c

@@ -202,7 +202,9 @@ int luat_ota_checkfile(const char* path) {
     int remain = binsize - 16;
 
     luat_md5_init(&ota->context);
+#ifdef LUAT_USE_CRYPTO
     luat_md5_starts(&ota->context);
+#endif
     while (remain > 0) {
         if (remain > OTA_CHECK_BUFF_SIZE) {
             len = luat_fs_fread(ota->buff, OTA_CHECK_BUFF_SIZE, 1, fd);