View | Details | Raw Unified | Return to bug 239117
Collapse All | Expand All

(-)gegl/gegl-config.c (+14 lines)
Lines 44-49 Link Here
44
#include <sys/sysctl.h>
44
#include <sys/sysctl.h>
45
#endif
45
#endif
46
46
47
#ifdef __FreeBSD__
48
#include <sys/types.h>
49
#include <sys/sysctl.h>
50
#endif
51
47
G_DEFINE_TYPE (GeglConfig, gegl_config, G_TYPE_OBJECT)
52
G_DEFINE_TYPE (GeglConfig, gegl_config, G_TYPE_OBJECT)
48
53
49
static GObjectClass * parent_class = NULL;
54
static GObjectClass * parent_class = NULL;
Lines 277-282 Link Here
277
# endif
282
# endif
278
                             ) * page_size;
283
                             ) * page_size;
279
      mach_port_deallocate (mach_task_self (), host);
284
      mach_port_deallocate (mach_task_self (), host);
285
    }
286
#elif defined(__FreeBSD__)
287
    size_t len = sizeof(unsigned int);
288
    unsigned int realmem, physmem;
289
    if(sysctlbyname("hw.realmem", &realmem, &len, NULL, 0)) {
290
      mem_total = (int64_t) realmem;
291
    }
292
    if (sysctlbyname("hw.physmem", &physmem, &len, NULL, 0)) {
293
      mem_available = physmem;
280
    }
294
    }
281
#else
295
#else
282
    mem_total = sysconf (_SC_PHYS_PAGES) * sysconf (_SC_PAGESIZE);
296
    mem_total = sysconf (_SC_PHYS_PAGES) * sysconf (_SC_PAGESIZE);

Return to bug 239117