diff --git a/log.c b/log.c index 88c41827..b840c80a 100644 --- a/log.c +++ b/log.c @@ -25,9 +25,6 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. #include #include #include -#ifdef __APPLE__ -#include -#endif #include #include #include diff --git a/mdp_client.c b/mdp_client.c index 22b13318..141b8e96 100644 --- a/mdp_client.c +++ b/mdp_client.c @@ -102,6 +102,7 @@ ssize_t _mdp_recv(struct __sourceloc __whence, int socket, struct mdp_header *he } struct socket_address addr; + bzero(&addr, sizeof addr); struct iovec iov[]={ { .iov_base = (void *)header, diff --git a/os.c b/os.c index c72a4f6f..e70b730b 100644 --- a/os.c +++ b/os.c @@ -34,6 +34,9 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. #include #include #include +#ifdef __APPLE__ +#include +#endif void log_info_mkdir(struct __sourceloc __whence, const char *path, mode_t mode) { diff --git a/overlay_mdp.c b/overlay_mdp.c index 160227f9..9f07cce6 100644 --- a/overlay_mdp.c +++ b/overlay_mdp.c @@ -1547,6 +1547,7 @@ static void mdp_poll2(struct sched_ent *alarm) uint8_t payload[1200]; struct mdp_header header; struct socket_address client; + bzero(&client, sizeof client); client.addrlen=sizeof(client.addr); struct iovec iov[]={