Added Cygwin build support

strverscmp is included to satisfy a dependency in Cygwin.
Excluded utmp and prctl functions that are not supported currently.
This commit is contained in:
Wayne Porter
2016-03-10 15:04:27 -08:00
parent 1af18812b2
commit eea5e467ae
5 changed files with 184 additions and 8 deletions

4
w.c
View File

@ -187,6 +187,7 @@ static void print_from(const utmp_t *restrict const u, const int ip_addresses, c
char buf[fromlen + 1];
char buf_ipv6[INET6_ADDRSTRLEN];
int len;
#ifndef __CYGWIN__
int32_t ut_addr_v6[4]; /* IP address of the remote host */
if (ip_addresses) { /* -i switch used */
@ -224,6 +225,9 @@ static void print_from(const utmp_t *restrict const u, const int ip_addresses, c
} else { /* -i switch NOT used */
print_host(u->ut_host, UT_HOSTSIZE, fromlen);
}
#else
print_host(u->ut_host, UT_HOSTSIZE, fromlen);
#endif
}