mirror of
https://gitlab.nic.cz/labs/bird.git
synced 2024-12-22 09:41:54 +00:00
Portability fixes.
This commit is contained in:
parent
23b1539bf9
commit
49ed70b48e
@ -7,6 +7,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
#include <sys/types.h>
|
||||||
#include <sys/socket.h>
|
#include <sys/socket.h>
|
||||||
#include <netinet/in.h>
|
#include <netinet/in.h>
|
||||||
#include <net/if.h>
|
#include <net/if.h>
|
||||||
@ -39,8 +40,8 @@ scan_ifs(struct ifreq *r, int cnt)
|
|||||||
for (cnt /= sizeof(struct ifreq); cnt; cnt--, r++)
|
for (cnt /= sizeof(struct ifreq); cnt; cnt--, r++)
|
||||||
{
|
{
|
||||||
bzero(&i, sizeof(i));
|
bzero(&i, sizeof(i));
|
||||||
DBG("%s\n", r->ifr_ifrn.ifrn_name);
|
DBG("%s\n", r->ifr_name);
|
||||||
strncpy(i.name, r->ifr_ifrn.ifrn_name, sizeof(i.name) - 1);
|
strncpy(i.name, r->ifr_name, sizeof(i.name) - 1);
|
||||||
get_sockaddr((struct sockaddr_in *) &r->ifr_addr, &i.ip, NULL);
|
get_sockaddr((struct sockaddr_in *) &r->ifr_addr, &i.ip, NULL);
|
||||||
if (ipa_nonzero(i.ip))
|
if (ipa_nonzero(i.ip))
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user