225 |
|
|
226 |
|
bool ether_init(void) |
227 |
|
{ |
228 |
< |
int val, nonblock = 1; |
228 |
> |
int val; |
229 |
|
char str[256]; |
230 |
|
|
231 |
|
// Do nothing if no Ethernet device specified |
262 |
|
// Initialize slirp library |
263 |
|
if (net_if_type == NET_IF_SLIRP) { |
264 |
|
if (slirp_init() < 0) { |
265 |
< |
sprintf(str, GetString(STR_SLIRP_NO_DNS_FOUND_WARN)); |
265 |
> |
sprintf(str, "%s", GetString(STR_SLIRP_NO_DNS_FOUND_WARN)); |
266 |
|
WarningAlert(str); |
267 |
|
return false; |
268 |
|
} |
347 |
|
|
348 |
|
// Set nonblocking I/O |
349 |
|
#ifdef USE_FIONBIO |
350 |
+ |
int nonblock = 1; |
351 |
|
if (ioctl(fd, FIONBIO, &nonblock) < 0) { |
352 |
|
sprintf(str, GetString(STR_BLOCKING_NET_SOCKET_WARN), strerror(errno)); |
353 |
|
WarningAlert(str); |