Commit 3ac41371 authored by Huw Davies's avatar Huw Davies Committed by Alexandre Julliard

ntdll: Move the FILE ptr into the blocks that use it.

This is to prevent compiler warnings on non-linux platforms. Signed-off-by: 's avatarHuw Davies <huw@codeweavers.com> Signed-off-by: 's avatarAlexandre Julliard <julliard@winehq.org>
parent 6bc1e9f4
......@@ -1848,11 +1848,13 @@ static NTSTATUS get_firmware_info( SYSTEM_FIRMWARE_TABLE_INFORMATION *sfti, ULON
static void get_performance_info( SYSTEM_PERFORMANCE_INFORMATION *info )
{
unsigned long long totalram = 0, freeram = 0, totalswap = 0, freeswap = 0;
FILE *fp;
memset( info, 0, sizeof(*info) );
#if defined(linux)
{
FILE *fp;
if ((fp = fopen("/proc/uptime", "r")))
{
double uptime, idle_time;
......@@ -1861,6 +1863,7 @@ static void get_performance_info( SYSTEM_PERFORMANCE_INFORMATION *info )
fclose(fp);
info->IdleTime.QuadPart = 10000000 * idle_time;
}
}
#elif defined(__FreeBSD__) || defined(__FreeBSD_kernel__)
{
static int clockrate_name[] = { CTL_KERN, KERN_CLOCKRATE };
......@@ -1885,6 +1888,9 @@ static void get_performance_info( SYSTEM_PERFORMANCE_INFORMATION *info )
#endif
#ifdef linux
{
FILE *fp;
if ((fp = fopen("/proc/meminfo", "r")))
{
unsigned long long value;
......@@ -1907,6 +1913,7 @@ static void get_performance_info( SYSTEM_PERFORMANCE_INFORMATION *info )
}
fclose(fp);
}
}
#elif defined(__FreeBSD__) || defined(__FreeBSD_kernel__) || defined(__NetBSD__) || \
defined(__OpenBSD__) || defined(__DragonFly__) || defined(__APPLE__)
{
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment