Revision 3f4cb3d3 net.c

b/net.c
626 626
    }
627 627

  
628 628
    /* XXX: better tmp dir construction */
629
    snprintf(smb_dir, sizeof(smb_dir), "/tmp/qemu-smb.%d", getpid());
629
    snprintf(smb_dir, sizeof(smb_dir), "/tmp/qemu-smb.%ld", (long)getpid());
630 630
    if (mkdir(smb_dir, 0700) < 0) {
631 631
        fprintf(stderr, "qemu: could not create samba server dir '%s'\n", smb_dir);
632 632
        exit(1);
......
740 740
    struct strbuf sbuf;
741 741
    int f = 0;
742 742
    sbuf.maxlen = sizeof(buf);
743
    sbuf.buf = buf;
743
    sbuf.buf = (char *)buf;
744 744
    size = getmsg(s->fd, NULL, &sbuf, &f) >=0 ? sbuf.len : -1;
745 745
#else
746 746
    size = read(s->fd, buf, sizeof(buf));
......
796 796
 * Allocate TAP device, returns opened fd.
797 797
 * Stores dev name in the first arg(must be large enough).
798 798
 */
799
int tap_alloc(char *dev, size_t dev_size)
799
static int tap_alloc(char *dev, size_t dev_size)
800 800
{
801 801
    int tap_fd, if_fd, ppa = -1;
802 802
    static int ip_fd = 0;

Also available in: Unified diff