diff --git a/setools/policyrep/boolcond.pxi b/setools/policyrep/boolcond.pxi index 13e730be..26339fb5 100644 --- a/setools/policyrep/boolcond.pxi +++ b/setools/policyrep/boolcond.pxi @@ -333,7 +333,7 @@ cdef class ConditionalExprIterator(PolicyIterator): if self.curr.expr_type == sepol.COND_BOOL: item = Boolean.factory(self.policy, - self.policy.boolean_value_to_datum(self.curr.bool - 1)) + self.policy.boolean_value_to_datum(self.curr.boolean - 1)) else: item = ConditionalOperator.factory(self.policy, self.curr) diff --git a/setools/policyrep/sepol.pxd b/setools/policyrep/sepol.pxd index 36589ed1..922065e4 100644 --- a/setools/policyrep/sepol.pxd +++ b/setools/policyrep/sepol.pxd @@ -283,6 +283,14 @@ cdef extern from "": cdef extern from "": + """ + #if defined(COND_EXPR_T_RENAME_BOOL_BOOLEAN) + #define COND_EXPR_T_RENAME_BOOL_NAME boolean + #else + #define COND_EXPR_T_RENAME_BOOL_NAME bool + #endif + """ + cdef int COND_EXPR_MAXDEPTH cdef int COND_MAX_BOOLS @@ -309,7 +317,7 @@ cdef extern from "": cdef struct cond_expr: uint32_t expr_type - uint32_t bool + uint32_t boolean "COND_EXPR_T_RENAME_BOOL_NAME" cond_expr *next ctypedef cond_expr cond_expr_t