File cfengine-2.1.11-chflags.dif of Package cfengine

diff -Nur cfengine-2.1.9.orig/src/filedir.c cfengine-2.1.9.new/src/filedir.c
--- cfengine-2.1.9.orig/src/filedir.c	2004-04-17 16:11:07.000000000 +0200
+++ cfengine-2.1.9.new/src/filedir.c	2004-08-11 13:36:10.665814345 +0200
@@ -261,7 +261,7 @@
   int amroot = true, fixmode = true, docompress=false;
   unsigned char digest[EVP_MAX_MD_SIZE+1];
 
-#if defined HAVE_CHFLAGS
+#if defined HAVE_CHFLAGS  && ! defined __linux__
   u_long newflags;
 #endif
 
@@ -279,7 +279,7 @@
   
 Debug("%s: Checking fs-object %s\n",VPREFIX,file);
 
-#if defined HAVE_CHFLAGS
+#if defined HAVE_CHFLAGS && ! defined __linux__
 if (ptr != NULL)
    {
    Debug("CheckExistingFile(+%o,-%o,+%o,-%o)\n",plus,minus,ptr->plus_flags,ptr->minus_flags);
@@ -514,7 +514,7 @@
       }
    }
 
-#ifndef HAVE_CHFLAGS
+#if ! defined HAVE_CHFLAGS || defined __linux__
 if (((newperm & 07777) == (dstat->st_mode & 07777)) && (action != touch))    /* file okay */
    {
    Debug("File okay, newperm = %o, stat = %o\n",(newperm & 07777),(dstat->st_mode & 07777));
@@ -663,7 +663,7 @@
    }
  
  
-#if defined HAVE_CHFLAGS  /* BSD special flags */
+#if defined HAVE_CHFLAGS && ! defined __linux__ /* BSD special flags */
 
 if (ptr != NULL)
    {