[PATCH] AIX Fix xlc designated initializer bug

Michael Adam obnox at samba.org
Mon Feb 29 21:41:46 UTC 2016


I don't get it.

The error message from the patch says:

"../source3/locking/brlock.c", line 1034.32: 1506-196 (S)
Initialization between types "unsigned long long" and
"struct server_id" is not allowed. [...]

why unsigned long long? pid is struct server_id, and
so is the member of context. So the problem description
sounds fishy to me..

If that fixes it, you could initialize the context
struct with more members in one assignment like so:

lock = (struct lock_struct) {
	.context = {
		.smblctx = smblctx,
		.pid = pid,
		.tid = br_lck->fsp->conn->cnum,
	},
	.start = start,
	...
}

how about that?

Cheers - Michael

On 2016-02-29 at 21:13 +0000, Guillaume G Taillon wrote:
> This is a bug in xlc, a PMR has been opened to get it fixed.
> The workaround is to add curly brackets around the problematic fields.
> 
> Is this too simple a fix? I considered using #ifs but 5 lines for a 
> syntactic
> problem seemed too gross for me. Eg (not tested):
> 
> #define IBMC_COMPAT_INITIALIZERS 1313
> [...]
> #if defined(__IMBC__) && __IBMC__ <= IBMC_COMPAT_INITIALIZERS 
>     .context = {.pid = pid},
> #else 
>     .context.pid = pid,
> #endif
> 
> https://bugzilla.samba.org/show_bug.cgi?id=11748
> 
> 
> 
> gxt


-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 198 bytes
Desc: not available
URL: <http://lists.samba.org/pipermail/samba-technical/attachments/20160229/3281a2c4/signature.sig>


More information about the samba-technical mailing list