File cfengine-2.2.2-chflags.dif of Package cfengine

--- src/filedir.c
+++ src/filedir.c
@@ -127,7 +127,7 @@
   unsigned char digest1[EVP_MAX_MD_SIZE+1];
   unsigned char digest2[EVP_MAX_MD_SIZE+1];
 
-#if defined HAVE_CHFLAGS
+#if defined HAVE_CHFLAGS && ! defined __linux__
   u_long newflags;
 #endif
 
@@ -149,7 +149,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",ptr->plus,ptr->minus,ptr->plus_flags,ptr->minus_flags);
@@ -409,7 +409,7 @@
       }
    }
 
-#ifndef HAVE_CHFLAGS
+#if ! defined HAVE_CHFLAGS || defined __linux__ 
 if (((newperm & 07777) == (dstat->st_mode & 07777)) && (ptr->action != touch))    /* file okay */
    {
    Debug("File okay, newperm = %o, stat = %o\n",(newperm & 07777),(dstat->st_mode & 07777));
@@ -564,7 +564,7 @@
    }
  
  
-#if defined HAVE_CHFLAGS  /* BSD special flags */
+#if defined HAVE_CHFLAGS && ! defined __linux__ /* BSD special flags */
 
 if (ptr != NULL)
    {
openSUSE Build Service is sponsored by