Commit c94c8d6499690461a0aa0ae9245ce4b0715ed4a8
1 parent
01038d2a
win32 + Mac OS X compile
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@1063 c046a42c-6fe2-441c-8c8c-71466251a162
Showing
1 changed file
with
11 additions
and
0 deletions
vl.c
... | ... | @@ -38,6 +38,7 @@ |
38 | 38 | #include <sys/mman.h> |
39 | 39 | #include <sys/ioctl.h> |
40 | 40 | #include <sys/socket.h> |
41 | +#include <netinet/in.h> | |
41 | 42 | #include <dirent.h> |
42 | 43 | #ifdef _BSD |
43 | 44 | #include <sys/stat.h> |
... | ... | @@ -1455,6 +1456,8 @@ static void net_slirp_redir(const char *redir_str) |
1455 | 1456 | exit(1); |
1456 | 1457 | } |
1457 | 1458 | |
1459 | +#ifndef _WIN32 | |
1460 | + | |
1458 | 1461 | char smb_dir[1024]; |
1459 | 1462 | |
1460 | 1463 | static void smb_exit(void) |
... | ... | @@ -1531,6 +1534,8 @@ void net_slirp_smb(const char *exported_dir) |
1531 | 1534 | slirp_add_exec(0, smb_cmdline, 4, 139); |
1532 | 1535 | } |
1533 | 1536 | |
1537 | +#endif /* !defined(_WIN32) */ | |
1538 | + | |
1534 | 1539 | #endif /* CONFIG_SLIRP */ |
1535 | 1540 | |
1536 | 1541 | #if !defined(_WIN32) |
... | ... | @@ -2484,7 +2489,9 @@ void help(void) |
2484 | 2489 | #ifdef CONFIG_SLIRP |
2485 | 2490 | "-user-net use user mode network stack [default if no tap/tun script]\n" |
2486 | 2491 | "-tftp prefix allow tftp access to files starting with prefix [-user-net]\n" |
2492 | +#ifndef _WIN32 | |
2487 | 2493 | "-smb dir allow SMB access to files in 'dir' [-user-net]\n" |
2494 | +#endif | |
2488 | 2495 | "-redir [tcp|udp]:host-port:[guest-host]:guest-port\n" |
2489 | 2496 | " redirect TCP or UDP connections from host to guest [-user-net]\n" |
2490 | 2497 | #endif |
... | ... | @@ -2617,7 +2624,9 @@ const QEMUOption qemu_options[] = { |
2617 | 2624 | #ifdef CONFIG_SLIRP |
2618 | 2625 | { "user-net", 0, QEMU_OPTION_user_net }, |
2619 | 2626 | { "tftp", HAS_ARG, QEMU_OPTION_tftp }, |
2627 | +#ifndef _WIN32 | |
2620 | 2628 | { "smb", HAS_ARG, QEMU_OPTION_smb }, |
2629 | +#endif | |
2621 | 2630 | { "redir", HAS_ARG, QEMU_OPTION_redir }, |
2622 | 2631 | #endif |
2623 | 2632 | { "dummy-net", 0, QEMU_OPTION_dummy_net }, |
... | ... | @@ -2914,9 +2923,11 @@ int main(int argc, char **argv) |
2914 | 2923 | case QEMU_OPTION_tftp: |
2915 | 2924 | tftp_prefix = optarg; |
2916 | 2925 | break; |
2926 | +#ifndef _WIN32 | |
2917 | 2927 | case QEMU_OPTION_smb: |
2918 | 2928 | net_slirp_smb(optarg); |
2919 | 2929 | break; |
2930 | +#endif | |
2920 | 2931 | case QEMU_OPTION_user_net: |
2921 | 2932 | net_if_type = NET_IF_USER; |
2922 | 2933 | break; | ... | ... |