rust/cargo-c: update to 0.10.7+cargo-0.84.0
[oi-userland.git] / components / runtime / wine / patches / 03-ntdll-virtual.patch
blob851422d6e075dc9f847c47d40449107cd3f6ebc4
1 diff --git a/dlls/ntdll/virtual.c b/dlls/ntdll/virtual.c
2 index d15b49f6fd..14a58d67cb 100644
3 --- a/dlls/ntdll/virtual.c
4 +++ b/dlls/ntdll/virtual.c
5 @@ -1894,15 +1894,23 @@ void virtual_init_threading(void)
6 */
7 void virtual_get_system_info( SYSTEM_BASIC_INFORMATION *info )
9 +#ifdef __sun
10 + LONG64 phys_pages;
11 +#else
12 #ifdef HAVE_SYSINFO
13 struct sysinfo sinfo;
14 #endif
15 +#endif /* __sun */
17 info->unknown = 0;
18 info->KeMaximumIncrement = 0; /* FIXME */
19 info->PageSize = page_size;
20 info->MmLowestPhysicalPage = 1;
21 info->MmHighestPhysicalPage = 0x7fffffff / page_size;
22 +#ifdef __sun
23 + phys_pages = sysconf( _SC_PHYS_PAGES );
24 + info->MmHighestPhysicalPage = max(1, phys_pages);
25 +#else
26 #ifdef HAVE_SYSINFO
27 if (!sysinfo(&sinfo))
29 @@ -1910,6 +1918,7 @@ void virtual_get_system_info( SYSTEM_BASIC_INFORMATION *info )
30 info->MmHighestPhysicalPage = max(1, total / page_size);
32 #endif
33 +#endif /* __sun */
34 info->MmNumberOfPhysicalPages = info->MmHighestPhysicalPage - info->MmLowestPhysicalPage;
35 info->AllocationGranularity = get_mask(0) + 1;
36 info->LowestUserAddress = (void *)0x10000;
37 --
38 2.23.0