|
@@ -27,7 +27,7 @@
|
|
|
#include "net/slirp.h"
|
|
|
|
|
|
|
|
|
-#ifndef _WIN32
|
|
|
+#if !defined(_WIN32) && !defined(CONFIG_IOS)
|
|
|
#include <pwd.h>
|
|
|
#include <sys/wait.h>
|
|
|
#endif
|
|
@@ -90,7 +90,7 @@ typedef struct SlirpState {
|
|
|
Slirp *slirp;
|
|
|
Notifier poll_notifier;
|
|
|
Notifier exit_notifier;
|
|
|
-#ifndef _WIN32
|
|
|
+#if !defined(_WIN32) && !defined(CONFIG_IOS)
|
|
|
gchar *smb_dir;
|
|
|
#endif
|
|
|
GSList *fwd;
|
|
@@ -103,7 +103,7 @@ static QTAILQ_HEAD(, SlirpState) slirp_stacks =
|
|
|
static int slirp_hostfwd(SlirpState *s, const char *redir_str, Error **errp);
|
|
|
static int slirp_guestfwd(SlirpState *s, const char *config_str, Error **errp);
|
|
|
|
|
|
-#ifndef _WIN32
|
|
|
+#if !defined(_WIN32) && !defined(CONFIG_IOS)
|
|
|
static int slirp_smb(SlirpState *s, const char *exported_dir,
|
|
|
struct in_addr vserver_addr, Error **errp);
|
|
|
static void slirp_smb_cleanup(SlirpState *s);
|
|
@@ -368,7 +368,7 @@ static int net_slirp_init(NetClientState *peer, const char *model,
|
|
|
struct in6_addr ip6_prefix;
|
|
|
struct in6_addr ip6_host;
|
|
|
struct in6_addr ip6_dns;
|
|
|
-#ifndef _WIN32
|
|
|
+#if !defined(_WIN32) && !defined(CONFIG_IOS)
|
|
|
struct in_addr smbsrv = { .s_addr = 0 };
|
|
|
#endif
|
|
|
NetClientState *nc;
|
|
@@ -478,7 +478,7 @@ static int net_slirp_init(NetClientState *peer, const char *model,
|
|
|
return -1;
|
|
|
}
|
|
|
|
|
|
-#ifndef _WIN32
|
|
|
+#if !defined(_WIN32) && !defined(CONFIG_IOS)
|
|
|
if (vsmbserver && !inet_aton(vsmbserver, &smbsrv)) {
|
|
|
error_setg(errp, "Failed to parse SMB address");
|
|
|
return -1;
|
|
@@ -593,7 +593,7 @@ static int net_slirp_init(NetClientState *peer, const char *model,
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
-#ifndef _WIN32
|
|
|
+#if !defined(_WIN32) && !defined(CONFIG_IOS)
|
|
|
if (smb_export) {
|
|
|
if (slirp_smb(s, smb_export, smbsrv, errp) < 0) {
|
|
|
goto error;
|
|
@@ -785,7 +785,7 @@ void hmp_hostfwd_add(Monitor *mon, const QDict *qdict)
|
|
|
|
|
|
}
|
|
|
|
|
|
-#ifndef _WIN32
|
|
|
+#if !defined(_WIN32) && !defined(CONFIG_IOS)
|
|
|
|
|
|
/* automatic user mode samba server configuration */
|
|
|
static void slirp_smb_cleanup(SlirpState *s)
|
|
@@ -900,7 +900,7 @@ static int slirp_smb(SlirpState* s, const char *exported_dir,
|
|
|
return 0;
|
|
|
}
|
|
|
|
|
|
-#endif /* !defined(_WIN32) */
|
|
|
+#endif /* !defined(_WIN32) && !defined(CONFIG_IOS) */
|
|
|
|
|
|
static int guestfwd_can_read(void *opaque)
|
|
|
{
|