Merge pull request #16 from wollistik/fix_build_issue
Fixing build issue on newer linux and also issues with newer Ruby
This commit is contained in:
commit
00760eebda
10
Rakefile
10
Rakefile
|
@ -51,15 +51,15 @@ end
|
||||||
desc 'Build sigar extension'
|
desc 'Build sigar extension'
|
||||||
task :build do
|
task :build do
|
||||||
in_ext()
|
in_ext()
|
||||||
unless File.exists? "Makefile"
|
unless File.exist? "Makefile"
|
||||||
unless system("ruby extconf.rb")
|
unless system("ruby extconf.rb")
|
||||||
STDERR.puts "Failed to configure"
|
STDERR.puts "Failed to configure"
|
||||||
break
|
next
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
unless system(MAKE)
|
unless system(MAKE)
|
||||||
STDERR.puts 'Failed to ' + MAKE
|
STDERR.puts 'Failed to ' + MAKE
|
||||||
break
|
next
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -75,13 +75,13 @@ end
|
||||||
desc 'Clean sigar extension'
|
desc 'Clean sigar extension'
|
||||||
task :clean do
|
task :clean do
|
||||||
in_ext()
|
in_ext()
|
||||||
system(MAKE + ' clean') if File.exists? "Makefile"
|
system(MAKE + ' clean') if File.exist? "Makefile"
|
||||||
end
|
end
|
||||||
|
|
||||||
desc 'Dist Clean sigar extension'
|
desc 'Dist Clean sigar extension'
|
||||||
task :distclean do
|
task :distclean do
|
||||||
in_ext()
|
in_ext()
|
||||||
system(MAKE + ' distclean') if File.exists? "Makefile"
|
system(MAKE + ' distclean') if File.exist? "Makefile"
|
||||||
end
|
end
|
||||||
|
|
||||||
desc 'Run sigar examples (test)'
|
desc 'Run sigar examples (test)'
|
||||||
|
|
|
@ -30,6 +30,7 @@
|
||||||
|
|
||||||
#include <dirent.h>
|
#include <dirent.h>
|
||||||
#include <sys/stat.h>
|
#include <sys/stat.h>
|
||||||
|
#include <sys/time.h>
|
||||||
|
|
||||||
SIGAR_INLINE char *sigar_uitoa(char *buf, unsigned int n, int *len)
|
SIGAR_INLINE char *sigar_uitoa(char *buf, unsigned int n, int *len)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue