diff options
Diffstat (limited to 'source4/libcli/util/werror.h')
-rw-r--r-- | source4/libcli/util/werror.h | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/source4/libcli/util/werror.h b/source4/libcli/util/werror.h index 3cd76816dc..0f49514b9f 100644 --- a/source4/libcli/util/werror.h +++ b/source4/libcli/util/werror.h @@ -19,7 +19,7 @@ */ #ifndef _WERROR_H_ -#define _WERROR_H_ +#define _WERROR_H #include <stdint.h> @@ -29,9 +29,15 @@ from using bool for internal functions */ +#if defined(HAVE_IMMEDIATE_STRUCTURES) typedef struct {uint32_t v;} WERROR; #define W_ERROR(x) ((WERROR) { x }) #define W_ERROR_V(x) ((x).v) +#else +typedef uint32_t WERROR; +#define W_ERROR(x) (x) +#define W_ERROR_V(x) (x) +#endif #define W_ERROR_IS_OK(x) (W_ERROR_V(x) == 0) #define W_ERROR_EQUAL(x,y) (W_ERROR_V(x) == W_ERROR_V(y)) |