[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: sysinfo.h problem to compile



I have a very simple code:
=========
#include <sys/sysinfo.h>

int main() {
 struct sysinfo si;
}
=========

On KFreebsd it fails and causes FTBFS:
s.cpp:5:18: error: aggregate ?main()::sysinfo si? has incomplete type
and cannot be defined

On other systems it compiles without errors.
What can be a problem in?

The GNU/kFreeBSD does not have "struct sysinfo" at all.

The <sys/sysinfo.h> on GNU/kFreeBSD provides:

***
/* Return number of configured processors.  */
extern int get_nprocs_conf (void) __THROW;

/* Return number of available processors.  */
extern int get_nprocs (void) __THROW;

/* Return number of physical pages of memory in the system.  */
extern long int get_phys_pages (void) __THROW;

/* Return number of available physical pages of memory in the system.  */
extern long int get_avphys_pages (void) __THROW;
***

Petr


Reply to: