Skip to content

Commit c31e1c9

Browse files
committed
chore: win posix fix
1 parent 27d34a8 commit c31e1c9

File tree

2 files changed

+11
-3
lines changed

2 files changed

+11
-3
lines changed

src/core/httpmorph.c

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,15 +19,17 @@
1919
#include <stdio.h>
2020
#include <stdlib.h>
2121
#include <string.h>
22-
#include <strings.h> /* for strcasecmp */
2322
#include <time.h>
2423
#include <zlib.h>
2524

26-
/* Platform-specific socket headers */
25+
/* Platform-specific headers */
2726
#ifdef _WIN32
2827
#include <winsock2.h>
2928
#include <ws2tcpip.h>
3029
#include <windows.h>
30+
#define strcasecmp _stricmp
31+
#else
32+
#include <strings.h> /* for strcasecmp */
3133
#define close closesocket
3234
#define ssize_t SSIZE_T
3335
#pragma comment(lib, "ws2_32.lib")

src/tls/browser_profiles.c

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,15 @@
77
#include "browser_profiles.h"
88
#include <stdlib.h>
99
#include <string.h>
10-
#include <strings.h> /* for strcasecmp */
1110
#include <time.h>
1211

12+
/* Platform-specific headers */
13+
#ifdef _WIN32
14+
#define strcasecmp _stricmp
15+
#else
16+
#include <strings.h> /* for strcasecmp */
17+
#endif
18+
1319
/* Chrome 131 Profile */
1420
const browser_profile_t PROFILE_CHROME_131 = {
1521
.name = "Chrome 131",

0 commit comments

Comments
 (0)