mirror of
https://github.com/libvirt/libvirt.git
synced 2025-02-25 18:55:26 -06:00
Fix Win32 portability problems
The network filter / snapshot / hooks code introduced some non-portable pices that broke the win32 build * configure.ac: Check for net/ethernet.h required by nwfile config parsing code * src/conf/nwfilter_conf.c: Define ethernet protocol constants if net/ethernet.h is missing * src/util/hooks.c: Disable hooks build on Win32 since it lacks fork/exec/pipe * src/util/threads-win32.c: Fix unchecked return value * tools/virsh.c: Disable SIGPIPE on Win32 since it doesn't exist. Fix non-portable strftime() formats
This commit is contained in:
@@ -414,6 +414,7 @@ out:
|
||||
*/
|
||||
static int disconnected = 0; /* we may have been disconnected */
|
||||
|
||||
#ifdef SIGPIPE
|
||||
/*
|
||||
* vshCatchDisconnect:
|
||||
*
|
||||
@@ -442,6 +443,10 @@ vshSetupSignals(void) {
|
||||
|
||||
sigaction(SIGPIPE, &sig_action, NULL);
|
||||
}
|
||||
#else
|
||||
static void
|
||||
vshSetupSignals(void) {}
|
||||
#endif
|
||||
|
||||
/*
|
||||
* vshReconnect:
|
||||
@@ -8425,7 +8430,7 @@ cmdSnapshotList(vshControl *ctl, const vshCmd *cmd)
|
||||
&creation) < 0)
|
||||
continue;
|
||||
localtime_r(&creation, &time_info);
|
||||
strftime(timestr, sizeof(timestr), "%F %T %z", &time_info);
|
||||
strftime(timestr, sizeof(timestr), "%Y-%m-%d %H:%M:%S %z", &time_info);
|
||||
|
||||
vshPrint(ctl, " %-20s %-25s %s\n", names[i], timestr, state);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user