Fix OSX specific issues

This commit is contained in:
Jeremy Lakeman 2014-06-05 14:56:19 +09:30
parent f09e6c38d2
commit 66f266a0c0
4 changed files with 5 additions and 3 deletions

3
log.c
View File

@ -25,9 +25,6 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#include <sys/wait.h>
#include <sys/param.h>
#include <time.h>
#ifdef __APPLE__
#include <mach-o/dyld.h>
#endif
#include <unistd.h>
#include <sys/stat.h>
#include <fcntl.h>

View File

@ -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,

3
os.c
View File

@ -34,6 +34,9 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#include <dirent.h>
#include <time.h>
#include <string.h>
#ifdef __APPLE__
#include <mach-o/dyld.h>
#endif
void log_info_mkdir(struct __sourceloc __whence, const char *path, mode_t mode)
{

View File

@ -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[]={