Changeset 4814

Show
Ignore:
Timestamp:
10/02/08 10:08:40 (2 months ago)
Author:
jmowery
Message:

apparently sepol/errcodes.h does not always exist depending on version of libsepol

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/configure.ac

    r4806 r4814  
    550550dnl check for new error code format, added in libsepol 2.0.0 
    551551AC_CHECK_HEADER([sepol/errcodes.h], 
    552                 sepol_new_defines="yes", 
    553                 sepol_new_defines="no") 
     552                sepol_new_errcodes="yes", 
     553                sepol_new_errcodes="no") 
    554554 
    555555AC_RUN_IFELSE( 
     
    782782AC_DEFINE_UNQUOTED(TEST_POLICIES, "${test_policies}", [location of testing policies]) 
    783783 
    784 if test ${sepol_new_defines} != "yes" ; then 
     784if test ${sepol_new_errcodes} != "yes" ; then 
    785785   AC_DEFINE(SEPOL_ENOMEM, HASHTAB_OVERFLOW, [remap of libsepol 1.x.x define to 2.x.x]) 
    786786   AC_DEFINE(SEPOL_EEXIST, HASHTAB_PRESENT, [remap of libsepol 1.x.x define to 2.x.x]) 
     787else 
     788   AC_DEFINE(HAVE_SEPOL_ERRCODES, 1, [if libsepol has errcodes.h]) 
    787789fi 
    788790if test ${sepol_new_expand_boolmap} == "yes" ; then 
  • trunk/libqpol/src/policy_define.c

    r4813 r4814  
    5858#include <sepol/policydb/polcaps.h> 
    5959#endif 
     60#ifdef HAVE_SEPOL_ERRCODES 
    6061#include <sepol/errcodes.h> 
     62#endif 
    6163 
    6264#include "queue.h" 
  • trunk/libqpol/src/policy_extend.c

    r4813 r4814  
    3333#include <sepol/policydb/ebitmap.h> 
    3434#include <sepol/policydb/expand.h> 
     35#ifdef HAVE_SEPOL_ERRCODES 
    3536#include <sepol/errcodes.h> 
     37#endif 
    3638#include <qpol/policy.h> 
    3739#include <qpol/policy_extend.h>