incron (0.5.9-5) fix_ftbfs_gcc44

Summary

 appargs.cpp     |    1 +
 icd-main.cpp    |    1 +
 incroncfg.cpp   |    4 ++--
 inotify-cxx.cpp |    1 +
 usertable.cpp   |    1 +
 5 files changed, 6 insertions(+), 2 deletions(-)

    
download this patch

Patch contents

Patch to fix FTBFS with gcc 4.4
--- a/icd-main.cpp
+++ b/icd-main.cpp
@@ -24,6 +24,7 @@
 #include <sys/poll.h>
 #include <sys/stat.h>
 #include <cstring>
+#include <cstdio>
 
 #include "inotify-cxx.h"
 #include "appinst.h"
--- a/inotify-cxx.cpp
+++ b/inotify-cxx.cpp
@@ -20,6 +20,7 @@
  */
  
 
+#include <cstdio>
 #include <errno.h>
 #include <unistd.h>
 #include <fcntl.h>
--- a/usertable.cpp
+++ b/usertable.cpp
@@ -27,6 +27,7 @@
 #include <stdlib.h>
 #include <sys/stat.h>
 #include <cstring>
+#include <cstdio>
 
 #include "usertable.h"
 #include "incroncfg.h"
--- a/appargs.cpp
+++ b/appargs.cpp
@@ -21,6 +21,7 @@
 
 
 #include <cstring>
+#include <cstdio>
 
 #include "strtok.h"
 
--- a/incroncfg.cpp
+++ b/incroncfg.cpp
@@ -181,10 +181,10 @@
 
 bool IncronCfg::IsComment(const char* s)
 {
-  char* sx = strchr(s, '#');
+  const char* sx = strchr(s, '#');
   if (sx == NULL)
     return false;
-    
+
   size_t len = sx - s;
   for (size_t i = 0; i < len; i++) {
     if (!(s[i] == ' ' || s[i] == '\t'))