mirror of
https://github.com/yann64/haikuports.git
synced 2026-04-13 07:10:05 +02:00
246 lines
9.6 KiB
Plaintext
246 lines
9.6 KiB
Plaintext
From 3fbe37b2dbf7cd6569dad94bde723b57a83a87c0 Mon Sep 17 00:00:00 2001
|
|
From: Sergei Reznikov <diver@gelios.net>
|
|
Date: Sat, 30 Jul 2022 15:08:57 +0300
|
|
Subject: Haiku fixes
|
|
|
|
|
|
diff --git a/meson.build b/meson.build
|
|
index e03f330..231572c 100644
|
|
--- a/meson.build
|
|
+++ b/meson.build
|
|
@@ -853,7 +853,7 @@ if not get_option('driver_remote').disabled()
|
|
# use extra library as it's provided by libc directly.
|
|
if host_machine.system() == 'windows'
|
|
xdr_dep = cc.find_library('portablexdr', required: get_option('driver_remote'))
|
|
- elif host_machine.system() == 'linux'
|
|
+ elif host_machine.system() in [ 'linux', 'haiku' ]
|
|
xdr_dep = dependency('libtirpc', required: get_option('driver_remote'))
|
|
elif host_machine.system() in [ 'freebsd', 'darwin' ]
|
|
xdr_dep = cc.find_library('c', required: get_option('driver_remote'))
|
|
@@ -939,7 +939,7 @@ if devmapper_dep.found()
|
|
endif
|
|
|
|
dlopen_use = host_machine.system() != 'windows'
|
|
-dlopen_dep = cc.find_library('dl', required: dlopen_use)
|
|
+dlopen_dep = cc.find_library('root', required: dlopen_use)
|
|
if dlopen_dep.found()
|
|
if not cc.has_header('dlfcn.h')
|
|
error('Unable to find dlfcn.h')
|
|
diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c
|
|
index 709ca53..250dcc7 100644
|
|
--- a/src/conf/domain_conf.c
|
|
+++ b/src/conf/domain_conf.c
|
|
@@ -31073,13 +31073,13 @@ virDomainNetNotifyActualDevice(virConnectPtr conn,
|
|
* so there is no point in trying to learn the actualMTU
|
|
* (final arg to virNetDevTapReattachBridge())
|
|
*/
|
|
- ignore_value(virNetDevTapReattachBridge(iface->ifname,
|
|
+/* ignore_value(virNetDevTapReattachBridge(iface->ifname,
|
|
virDomainNetGetActualBridgeName(iface),
|
|
&iface->mac, dom->uuid,
|
|
virDomainNetGetActualVirtPortProfile(iface),
|
|
virDomainNetGetActualVlan(iface),
|
|
virDomainNetGetActualPortOptionsIsolated(iface),
|
|
- iface->mtu, NULL));
|
|
+ iface->mtu, NULL));*/
|
|
}
|
|
}
|
|
|
|
diff --git a/src/network/bridge_driver.c b/src/network/bridge_driver.c
|
|
index 11696a9..d3b7515 100644
|
|
--- a/src/network/bridge_driver.c
|
|
+++ b/src/network/bridge_driver.c
|
|
@@ -2108,12 +2108,12 @@ networkShutdownNetworkVirtual(virNetworkObj *obj)
|
|
* from old libvirt, we still need to delete any dummy NIC
|
|
* that might exist. Keep this logic around for a while...
|
|
*/
|
|
- if (def->mac_specified) {
|
|
+/* if (def->mac_specified) {
|
|
g_autofree char *macTapIfName = networkBridgeDummyNicName(def->bridge);
|
|
if (macTapIfName && virNetDevExists(macTapIfName))
|
|
ignore_value(virNetDevTapDelete(macTapIfName, NULL));
|
|
}
|
|
-
|
|
+*/
|
|
ignore_value(virNetDevSetOnline(def->bridge, false));
|
|
|
|
if (def->forward.type != VIR_NETWORK_FORWARD_OPEN)
|
|
diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c
|
|
index 3b5c3db..082e5e5 100644
|
|
--- a/src/qemu/qemu_driver.c
|
|
+++ b/src/qemu/qemu_driver.c
|
|
@@ -10359,11 +10359,11 @@ qemuDomainInterfaceStats(virDomainPtr dom,
|
|
if (virNetDevVFInterfaceStats(vfAddr, stats) < 0)
|
|
goto cleanup;
|
|
|
|
- } else {
|
|
+/* } else {
|
|
if (virNetDevTapInterfaceStats(net->ifname, stats,
|
|
!virDomainNetTypeSharesHostView(net)) < 0)
|
|
goto cleanup;
|
|
- }
|
|
+*/ }
|
|
|
|
ret = 0;
|
|
cleanup:
|
|
@@ -18282,12 +18282,12 @@ qemuDomainGetStatsInterface(virQEMUDriver *driver G_GNUC_UNUSED,
|
|
continue;
|
|
}
|
|
} else {
|
|
- if (virNetDevTapInterfaceStats(net->ifname, &tmp,
|
|
+/* if (virNetDevTapInterfaceStats(net->ifname, &tmp,
|
|
!virDomainNetTypeSharesHostView(net)) < 0) {
|
|
virResetLastError();
|
|
continue;
|
|
}
|
|
- }
|
|
+*/ }
|
|
|
|
QEMU_ADD_NET_PARAM(params, i,
|
|
"rx.bytes", tmp.rx_bytes);
|
|
diff --git a/src/qemu/qemu_interface.c b/src/qemu/qemu_interface.c
|
|
index cf8117d..72cdab9 100644
|
|
--- a/src/qemu/qemu_interface.c
|
|
+++ b/src/qemu/qemu_interface.c
|
|
@@ -377,12 +377,12 @@ qemuCreateInBridgePortWithHelper(virQEMUDriverConfig *cfg,
|
|
goto cleanup;
|
|
}
|
|
|
|
- if (virNetDevTapGetName(*tapfd, ifname) < 0 ||
|
|
+/* if (virNetDevTapGetName(*tapfd, ifname) < 0 ||
|
|
virCommandWait(cmd, NULL) < 0) {
|
|
VIR_FORCE_CLOSE(*tapfd);
|
|
*tapfd = -1;
|
|
}
|
|
-
|
|
+*/
|
|
cleanup:
|
|
VIR_FREE(cmdstr);
|
|
VIR_FREE(errbuf);
|
|
@@ -448,20 +448,20 @@ qemuInterfaceEthernetConnect(virDomainDef *def,
|
|
goto cleanup;
|
|
}
|
|
} else {
|
|
- if (virNetDevTapCreate(&net->ifname, tunpath, tapfd, tapfdSize,
|
|
+/* if (virNetDevTapCreate(&net->ifname, tunpath, tapfd, tapfdSize,
|
|
tap_create_flags) < 0)
|
|
goto cleanup;
|
|
- }
|
|
+*/ }
|
|
} else {
|
|
|
|
if (!net->ifname)
|
|
template_ifname = true;
|
|
-
|
|
+/*
|
|
if (virNetDevTapCreate(&net->ifname, tunpath, tapfd, tapfdSize,
|
|
tap_create_flags) < 0) {
|
|
goto cleanup;
|
|
}
|
|
-
|
|
+*/
|
|
/* The tap device's MAC address cannot match the MAC address
|
|
* used by the guest. This results in "received packet on
|
|
* vnetX with own address as source address" error logs from
|
|
@@ -560,7 +560,7 @@ qemuInterfaceBridgeConnect(virDomainDef *def,
|
|
tap_create_flags |= VIR_NETDEV_TAP_CREATE_VNET_HDR;
|
|
|
|
if (driver->privileged) {
|
|
- if (virNetDevTapCreateInBridgePort(brname, &net->ifname, &net->mac,
|
|
+/* if (virNetDevTapCreateInBridgePort(brname, &net->ifname, &net->mac,
|
|
def->uuid, tunpath, tapfd, *tapfdSize,
|
|
virDomainNetGetActualVirtPortProfile(net),
|
|
virDomainNetGetActualVlan(net),
|
|
@@ -570,7 +570,7 @@ qemuInterfaceBridgeConnect(virDomainDef *def,
|
|
virDomainAuditNetDevice(def, net, tunpath, false);
|
|
goto cleanup;
|
|
}
|
|
- if (virDomainNetGetActualBridgeMACTableManager(net)
|
|
+*/ if (virDomainNetGetActualBridgeMACTableManager(net)
|
|
== VIR_NETWORK_BRIDGE_MAC_TABLE_MANAGER_LIBVIRT) {
|
|
/* libvirt is managing the FDB of the bridge this device
|
|
* is attaching to, so we need to turn off learning and
|
|
diff --git a/src/qemu/qemu_process.c b/src/qemu/qemu_process.c
|
|
index 771a623..86a940e 100644
|
|
--- a/src/qemu/qemu_process.c
|
|
+++ b/src/qemu/qemu_process.c
|
|
@@ -8327,13 +8327,13 @@ void qemuProcessStop(virQEMUDriver *driver,
|
|
virDomainNetGetActualVirtPortProfile(net),
|
|
cfg->stateDir));
|
|
break;
|
|
- case VIR_DOMAIN_NET_TYPE_ETHERNET:
|
|
+/* case VIR_DOMAIN_NET_TYPE_ETHERNET:
|
|
if (net->managed_tap != VIR_TRISTATE_BOOL_NO && net->ifname) {
|
|
ignore_value(virNetDevTapDelete(net->ifname, net->backend.tap));
|
|
VIR_FREE(net->ifname);
|
|
}
|
|
break;
|
|
- case VIR_DOMAIN_NET_TYPE_BRIDGE:
|
|
+*/ case VIR_DOMAIN_NET_TYPE_BRIDGE:
|
|
case VIR_DOMAIN_NET_TYPE_NETWORK:
|
|
#ifdef VIR_NETDEV_TAP_REQUIRE_MANUAL_CLEANUP
|
|
if (!(vport && vport->virtPortType == VIR_NETDEV_VPORT_PROFILE_OPENVSWITCH))
|
|
diff --git a/src/storage/storage_util.c b/src/storage/storage_util.c
|
|
index 6ed2078..133abcd 100644
|
|
--- a/src/storage/storage_util.c
|
|
+++ b/src/storage/storage_util.c
|
|
@@ -1917,7 +1917,7 @@ virStorageBackendUpdateVolTargetInfoFD(virStorageSource *target,
|
|
# ifdef __linux__
|
|
target->timestamps->btime = (struct timespec){0, 0};
|
|
# else /* ! __linux__ */
|
|
- target->timestamps->btime = sb->st_birthtim;
|
|
+ target->timestamps->btime = sb->st_crtim;
|
|
# endif /* ! __linux__ */
|
|
target->timestamps->ctime = sb->st_ctim;
|
|
target->timestamps->mtime = sb->st_mtim;
|
|
diff --git a/src/util/meson.build b/src/util/meson.build
|
|
index 07ae946..b8d040e 100644
|
|
--- a/src/util/meson.build
|
|
+++ b/src/util/meson.build
|
|
@@ -64,7 +64,6 @@ util_sources = [
|
|
'virnetdevmacvlan.c',
|
|
'virnetdevmidonet.c',
|
|
'virnetdevopenvswitch.c',
|
|
- 'virnetdevtap.c',
|
|
'virnetdevveth.c',
|
|
'virnetdevvlan.c',
|
|
'virnetdevvportprofile.c',
|
|
diff --git a/src/util/virfile.c b/src/util/virfile.c
|
|
index 99da058..fbdf779 100644
|
|
--- a/src/util/virfile.c
|
|
+++ b/src/util/virfile.c
|
|
@@ -3107,7 +3107,7 @@ virFileBuildPath(const char *dir, const char *name, const char *ext)
|
|
/* Open a non-blocking primary side of a pty. If ttyName is not NULL,
|
|
* then populate it with the name of the secondary peer. If rawmode is
|
|
* set, also put the primary side into raw mode before returning. */
|
|
-#ifndef WIN32
|
|
+#if !defined(WIN32) && !defined(__HAIKU__)
|
|
int
|
|
virFileOpenTty(int *ttyprimary, char **ttyName, int rawmode)
|
|
{
|
|
@@ -4479,7 +4479,7 @@ virFileGetXAttr(const char *path,
|
|
int
|
|
virFileDataSync(int fd)
|
|
{
|
|
-#if defined(__APPLE__) || defined(WIN32)
|
|
+#if defined(__APPLE__) || defined(WIN32) || defined(__HAIKU__)
|
|
return g_fsync(fd);
|
|
#else
|
|
return fdatasync(fd);
|
|
diff --git a/src/vbox/vbox_XPCOMCGlue.c b/src/vbox/vbox_XPCOMCGlue.c
|
|
index 77a3041..b3f2c39 100644
|
|
--- a/src/vbox/vbox_XPCOMCGlue.c
|
|
+++ b/src/vbox/vbox_XPCOMCGlue.c
|
|
@@ -42,7 +42,7 @@
|
|
VIR_LOG_INIT("vbox.vbox_XPCOMCGlue");
|
|
|
|
#if defined(__linux__) || defined(__linux_gnu__) || defined(__sun__) || \
|
|
- defined(__FreeBSD__) || defined(__OpenBSD__) || \
|
|
+ defined(__FreeBSD__) || defined(__OpenBSD__) || defined(__HAIKU__) || \
|
|
defined(__FreeBSD_kernel__)
|
|
# define DYNLIB_NAME "VBoxXPCOMC.so"
|
|
#elif defined(__APPLE__)
|
|
--
|
|
2.36.1
|
|
|