Commit c94c8d6499690461a0aa0ae9245ce4b0715ed4a8

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