File cfengine-2.2.8-chflags.dif of Package cfengine

--- src/filedir.c
+++ src/filedir.c
@@ -128,7 +128,7 @@
   unsigned char digest2[EVP_MAX_MD_SIZE+1];
   enum fileactions action = ptr->action;
 
-#if defined HAVE_CHFLAGS
+#if defined HAVE_CHFLAGS && ! defined __linux__
   u_long newflags;
 #endif
 
@@ -150,7 +150,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);
@@ -417,7 +417,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));
@@ -572,7 +572,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