-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
8a002b1
commit 352f25e
Showing
8 changed files
with
43 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -274,3 +274,4 @@ __pycache__/ | |
*.map | ||
*.log | ||
/Signing | ||
MinHook/libMinHook.x86.lib |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
|
||
#include <io.h> | ||
#include <winsock2.h> | ||
#include <ws2tcpip.h> | ||
|
||
#ifdef XP_BUILD | ||
int inet_pton(int af, const char* src, void* dst) | ||
{ | ||
struct sockaddr_storage ss; | ||
int size = sizeof(ss); | ||
char src_copy[INET6_ADDRSTRLEN + 1]; | ||
|
||
memset(&ss, 0, sizeof(ss)); | ||
/* stupid non-const API */ | ||
strncpy(src_copy, src, INET6_ADDRSTRLEN + 1); | ||
src_copy[INET6_ADDRSTRLEN] = 0; | ||
|
||
if (WSAStringToAddressA(src_copy, af, NULL, (struct sockaddr*)&ss, &size) == 0) { | ||
switch (af) { | ||
case AF_INET: | ||
*(struct in_addr*)dst = ((struct sockaddr_in*)&ss)->sin_addr; | ||
return 1; | ||
case AF_INET6: | ||
*(struct in6_addr*)dst = ((struct sockaddr_in6*)&ss)->sin6_addr; | ||
return 1; | ||
} | ||
} | ||
return 0; | ||
} | ||
#endif |
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters