diff --git a/src/common.h b/src/common.h index 1f25a9c..05c0bc9 100644 --- a/src/common.h +++ b/src/common.h @@ -32,7 +32,7 @@ #if defined IP_RECVDSTADDR # define DSTADDR_SOCKOPT IP_RECVDSTADDR -# define dstaddr(x) (CMSG_DATA(x)) +# define dstaddr(x) ((struct in_addr *) CMSG_DATA(x)) #elif defined IP_PKTINFO # define DSTADDR_SOCKOPT IP_PKTINFO # define dstaddr(x) (&(((struct in_pktinfo *)(CMSG_DATA(x)))->ipi_addr)) diff --git a/src/iodined.c b/src/iodined.c index ff3804f..0ff9eee 100644 --- a/src/iodined.c +++ b/src/iodined.c @@ -23,6 +23,7 @@ #include #include #include +#define _XPG4_2 #include #include #include