win32 + Mac OS X compile

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@1063 c046a42c-6fe2-441c-8c8c-71466251a162
This commit is contained in:
bellard 2004-09-13 21:37:34 +00:00
parent 01038d2a76
commit c94c8d6499
1 changed files with 11 additions and 0 deletions

11
vl.c
View File

@ -38,6 +38,7 @@
#include <sys/mman.h>
#include <sys/ioctl.h>
#include <sys/socket.h>
#include <netinet/in.h>
#include <dirent.h>
#ifdef _BSD
#include <sys/stat.h>
@ -1455,6 +1456,8 @@ static void net_slirp_redir(const char *redir_str)
exit(1);
}
#ifndef _WIN32
char smb_dir[1024];
static void smb_exit(void)
@ -1531,6 +1534,8 @@ void net_slirp_smb(const char *exported_dir)
slirp_add_exec(0, smb_cmdline, 4, 139);
}
#endif /* !defined(_WIN32) */
#endif /* CONFIG_SLIRP */
#if !defined(_WIN32)
@ -2484,7 +2489,9 @@ void help(void)
#ifdef CONFIG_SLIRP
"-user-net use user mode network stack [default if no tap/tun script]\n"
"-tftp prefix allow tftp access to files starting with prefix [-user-net]\n"
#ifndef _WIN32
"-smb dir allow SMB access to files in 'dir' [-user-net]\n"
#endif
"-redir [tcp|udp]:host-port:[guest-host]:guest-port\n"
" redirect TCP or UDP connections from host to guest [-user-net]\n"
#endif
@ -2617,7 +2624,9 @@ const QEMUOption qemu_options[] = {
#ifdef CONFIG_SLIRP
{ "user-net", 0, QEMU_OPTION_user_net },
{ "tftp", HAS_ARG, QEMU_OPTION_tftp },
#ifndef _WIN32
{ "smb", HAS_ARG, QEMU_OPTION_smb },
#endif
{ "redir", HAS_ARG, QEMU_OPTION_redir },
#endif
{ "dummy-net", 0, QEMU_OPTION_dummy_net },
@ -2914,9 +2923,11 @@ int main(int argc, char **argv)
case QEMU_OPTION_tftp:
tftp_prefix = optarg;
break;
#ifndef _WIN32
case QEMU_OPTION_smb:
net_slirp_smb(optarg);
break;
#endif
case QEMU_OPTION_user_net:
net_if_type = NET_IF_USER;
break;