Ticket #58524: patch-gegl-32bit-host-statistics.diff

File patch-gegl-32bit-host-statistics.diff, 824 bytes (added by kencu (Ken), 5 years ago)
  • gegl/gegl-config.c

    old new  
    262262    /* and available mem from host_statistics64 */
    263263    vm_size_t              page_size = sysconf (_SC_PAGESIZE);
    264264    mach_port_t            host = mach_host_self ();
    265     vm_statistics64_data_t vm_stat;
    266265    kern_return_t                kret;
     266
     267#if defined(__LP64__)
     268    vm_statistics64_data_t vm_stat;
    267269    unsigned int           count = HOST_VM_INFO64_COUNT;
    268270
    269271    kret = host_statistics64 (host, HOST_VM_INFO64, (host_info64_t)&vm_stat, &count);
     272#else
     273    vm_statistics_data_t vm_stat;
     274    unsigned int           count = HOST_VM_INFO_COUNT;
     275
     276    kret = host_statistics (host, HOST_VM_INFO, (host_info_t)&vm_stat, &count);
     277#endif
    270278
    271279    if (kret == KERN_SUCCESS)
    272280    {