fix compilation with glibc 2.26, major/minor functions, fixed #2
compilation error was: linux_sigar.c:1156:22: error: called object ‘major’ is not a function or function pointer linux_sigar.c:1157:22: error: called object ‘minor’ is not a function or function pointer
This commit is contained in:
parent
2f7284cd4c
commit
a2c67588d0
|
@ -49,6 +49,9 @@ when /mswin|mingw|cygwin|bccwin/
|
|||
have_library("version")
|
||||
when /linux/
|
||||
os = 'linux'
|
||||
if have_header("sys/sysmacros.h")
|
||||
$CPPFLAGS += ' -DLINUX_SYSMACROS'
|
||||
end
|
||||
when /solaris|sun/
|
||||
os = 'solaris'
|
||||
have_library("nsl")
|
||||
|
|
|
@ -30,6 +30,10 @@
|
|||
#include "sigar_util.h"
|
||||
#include "sigar_os.h"
|
||||
|
||||
#ifdef LINUX_SYSMACROS // added by extconf.rb
|
||||
#include <sys/sysmacros.h>
|
||||
#endif
|
||||
|
||||
#define pageshift(x) ((x) << sigar->pagesize)
|
||||
|
||||
#define PROC_MEMINFO PROC_FS_ROOT "meminfo"
|
||||
|
|
Loading…
Reference in New Issue