1 |
|
/* |
2 |
|
* ether.cpp - Ethernet device driver |
3 |
|
* |
4 |
< |
* Basilisk II (C) 1997-2002 Christian Bauer |
4 |
> |
* Basilisk II (C) 1997-2005 Christian Bauer |
5 |
|
* |
6 |
|
* This program is free software; you can redistribute it and/or modify |
7 |
|
* it under the terms of the GNU General Public License as published by |
35 |
|
#include <sys/socket.h> |
36 |
|
#include <sys/ioctl.h> |
37 |
|
#include <netdb.h> |
38 |
+ |
#include <unistd.h> |
39 |
|
#include <errno.h> |
40 |
|
#endif |
41 |
|
|
115 |
|
} |
116 |
|
|
117 |
|
// Retrieve local IP address (or at least one of them) |
118 |
< |
socklen_t sa_len = sizeof(sa); |
119 |
< |
getsockname(udp_socket, (struct sockaddr *)&sa, &sa_len); |
118 |
> |
socklen_t sa_length = sizeof(sa); |
119 |
> |
getsockname(udp_socket, (struct sockaddr *)&sa, &sa_length); |
120 |
|
uint32 udp_ip = sa.sin_addr.s_addr; |
121 |
|
if (udp_ip == INADDR_ANY || udp_ip == INADDR_LOOPBACK) { |
122 |
|
char name[256]; |