mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-03-07 17:28:15 +00:00
virhostuptime: Wrap virHostGetBootTimeProcfs() call in an ifdef
The virHostGetBootTimeProcfs() function is defined only for Linux and therefore it's only call should also be done if we're on Linux. Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
This commit is contained in:
parent
ffd151d17b
commit
1b0de07f41
@ -99,8 +99,10 @@ virHostGetBootTimeOnceInit(void)
|
|||||||
endutxent();
|
endutxent();
|
||||||
# endif /* HAVE_GETUTXID */
|
# endif /* HAVE_GETUTXID */
|
||||||
|
|
||||||
|
# ifdef __linux__
|
||||||
if (bootTimeErrno != 0 || bootTime == 0)
|
if (bootTimeErrno != 0 || bootTime == 0)
|
||||||
bootTimeErrno = -virHostGetBootTimeProcfs(&bootTime);
|
bootTimeErrno = -virHostGetBootTimeProcfs(&bootTime);
|
||||||
|
# endif /* __linux__ */
|
||||||
}
|
}
|
||||||
|
|
||||||
#else /* !defined(HAVE_GETUTXID) && !defined(__linux__) */
|
#else /* !defined(HAVE_GETUTXID) && !defined(__linux__) */
|
||||||
|
Loading…
x
Reference in New Issue
Block a user