Fix for Solaris C compiler.
authorJeremy Allison <jra@samba.org>
Thu, 16 Mar 2017 16:10:52 +0000 (09:10 -0700)
committerJeremy Allison <jra@samba.org>
Thu, 16 Mar 2017 19:30:19 +0000 (20:30 +0100)
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>
source3/include/tldap.h

index 74279a4ba18ff75307a169435f654c8d7bed4fb0..23e3f1b655b2f707c20b35c4beecc2832b1b54a6 100644 (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)