diff --git a/Rakefile b/Rakefile index 4147e1be..5751e249 100644 --- a/Rakefile +++ b/Rakefile @@ -51,15 +51,15 @@ end desc 'Build sigar extension' task :build do in_ext() - unless File.exists? "Makefile" + unless File.exist? "Makefile" unless system("ruby extconf.rb") STDERR.puts "Failed to configure" - break + next end end unless system(MAKE) STDERR.puts 'Failed to ' + MAKE - break + next end end @@ -75,13 +75,13 @@ end desc 'Clean sigar extension' task :clean do in_ext() - system(MAKE + ' clean') if File.exists? "Makefile" + system(MAKE + ' clean') if File.exist? "Makefile" end desc 'Dist Clean sigar extension' task :distclean do in_ext() - system(MAKE + ' distclean') if File.exists? "Makefile" + system(MAKE + ' distclean') if File.exist? "Makefile" end desc 'Run sigar examples (test)' diff --git a/src/sigar_util.c b/src/sigar_util.c index 46aa77f0..e9ce9fc6 100644 --- a/src/sigar_util.c +++ b/src/sigar_util.c @@ -30,6 +30,7 @@ #include #include +#include SIGAR_INLINE char *sigar_uitoa(char *buf, unsigned int n, int *len) {