Fix MinGW compilation errors in jerry-ext (#4510)

MinGW also needs linking to ws2_32.
Defining socket types for unix/win32 for compatibility.
Also fixes #4512

JerryScript-DCO-1.0-Signed-off-by: Yonggang Luo luoyonggang@gmail.com
This commit is contained in:
Yonggang Luo
2021-01-22 08:54:36 -08:00
committed by GitHub
parent 9900cacb15
commit 1db0905889
4 changed files with 47 additions and 25 deletions
+1 -1
View File
@@ -127,7 +127,7 @@ jerry_port_normalize_path (const char *in_path_p, /**< input file path */
char *dir_p = (char *) malloc (_MAX_DIR);
_splitpath_s (base_file_p, drive, _MAX_DRIVE, dir_p, _MAX_DIR, NULL, 0, NULL, 0);
const size_t drive_len = strnlen (&drive, _MAX_DRIVE);
const size_t drive_len = strnlen (drive, _MAX_DRIVE);
const size_t dir_len = strnlen (dir_p, _MAX_DIR);
base_drive_dir_len = drive_len + dir_len;
path_p = (char *) malloc (base_drive_dir_len + in_path_len + 1);