1
0
mirror of https://github.com/gryf/wmaker.git synced 2026-02-02 22:25:48 +01:00

Bug fix in the networking code

This commit is contained in:
dan
2000-04-17 21:24:58 +00:00
parent 74bbc24da2
commit cf3bb1fd0e
2 changed files with 11 additions and 7 deletions

View File

@@ -19,6 +19,7 @@
*/
#include "../src/config.h"
#include <unistd.h>
#include <string.h>
@@ -30,9 +31,9 @@
#include "WUtil.h"
/* Tell stupid Solaris what's going on */
#ifndef INADDR_NONE
#define INADDR_NONE (-1)
/* For some Solaris systems */
#if !defined(HAVE_INET_ATON) && !defined(INADDR_NONE)
# define INADDR_NONE (-1)
#endif
@@ -171,7 +172,7 @@ WMGetHostWithAddress(char* address)
if ((in.s_addr = inet_addr(address)) == INADDR_NONE)
return NULL;
#else
if (inet_aton(address, &in.s_addr) == 0)
if (inet_aton(address, &in) == 0)
return NULL;
#endif