From 8b887b2380c4aadea82402904d9c1131bbb9c521 Mon Sep 17 00:00:00 2001 From: Wolfgang Wedelich-John Date: Tue, 10 Sep 2024 12:58:09 +0200 Subject: [PATCH] Fixing build issue on newer linux and alos issue with newer Ruby --- Rakefile | 10 +++++----- src/sigar_util.c | 1 + 2 files changed, 6 insertions(+), 5 deletions(-) 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) {