1
0
mirror of https://github.com/samba-team/samba.git synced 2025-01-08 21:18:16 +03:00

Fix for Solaris C compiler.

Inspired by comment 4 in bug 12559.

BUG: https://bugzilla.samba.org/show_bug.cgi?id=12559

Signed-off-by: Tom Schulz <schulz@adi.com>
Reviewed-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Martin Schwenke <martin@meltin.net>
This commit is contained in:
Jeremy Allison 2017-03-16 09:10:52 -07:00
parent 1eaafead1e
commit 59229276bc

View File

@ -47,9 +47,15 @@ struct tldap_mod {
DATA_BLOB *values;
};
#if defined(HAVE_IMMEDIATE_STRUCTURES)
typedef struct { uint8_t rc; } TLDAPRC;
#define TLDAP_RC(x) ((TLDAPRC){.rc = x})
#define TLDAP_RC_V(x) ((x).rc)
#else
typedef uint8_t TLDAPRC;
#define TLDAP_RC(x) (x)
#define TLDAP_RC_V(x) (x)
#endif
#define TLDAP_RC_EQUAL(x,y) (TLDAP_RC_V(x)==TLDAP_RC_V(y))
#define TLDAP_RC_IS_SUCCESS(x) TLDAP_RC_EQUAL(x,TLDAP_SUCCESS)