Skip to content

Improved data types in Inet.c #28

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions win32/inet.c
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
#if (_WIN32_WINNT < 0x0600) /* Vista/2k8 have these functions */


PHPAPI int inet_pton(int af, const char* src, void* dst)
PHPAPI short int inet_pton(int af, const char* src, void* dst)
{
int address_length;
struct sockaddr_storage sa;
Expand Down Expand Up @@ -79,7 +79,7 @@ PHPAPI const char* inet_ntop(int af, const void* src, char* dst, size_t size)

#endif

int inet_aton(const char *cp, struct in_addr *inp) {
unsigned short int inet_aton(const char *cp, struct in_addr *inp) {
inp->s_addr = inet_addr(cp);

if (inp->s_addr == INADDR_NONE) {
Expand Down