Bug 11153 - syntax error in source3/locking/brlock.c
syntax error in source3/locking/brlock.c
Status: RESOLVED FIXED
Product: Samba 4.1 and newer
Classification: Unclassified
Component: Build
4.2.0
All Solaris
: P5 normal
: ---
Assigned To: Karolin Seeger
Samba QA Contact
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2015-03-11 15:37 UTC by Tom Schulz
Modified: 2015-03-27 20:12 UTC (History)
1 user (show)

See Also:


Attachments
Patch for source3/locking/brlock.c (847 bytes, text/plain)
2015-03-11 15:37 UTC, Tom Schulz
no flags Details
cherry-picked patch from master (1.20 KB, patch)
2015-03-12 04:32 UTC, Christof Schmitt
cs: review+
obnox: review+
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Tom Schulz 2015-03-11 15:37:45 UTC
Created attachment 10854 [details]
Patch for source3/locking/brlock.c

I have been building 4.2.0 on Solaris 10 using the GNU C compiler. I decided
to see what happens with Sun's C 5.11 SunOS_i386 compiler. It complains
with the following error:

"../source3/locking/brlock.c", line 2008: syntax error before or at: }
cc: acomp failed for ../source3/locking/brlock.c

The offending line is:

        *br_lck = (struct byte_range_lock) {};

The GNU C compiler thinks that this line is OK.

The attached patch is an edited version of a patch from Christof Schmitt.
It was edited to just fix the fatal error and not fix the many warnings.
Comment 1 Michael Adam 2015-03-11 17:54:23 UTC
Thanks.
Exactly what I'd propose.
Christof, what do you think?
Comment 2 Christof Schmitt 2015-03-12 04:32:55 UTC
Created attachment 10863 [details]
cherry-picked patch from master

Agreed, see attached patch.
Comment 3 Michael Adam 2015-03-12 14:02:29 UTC
Karolin, please pick to 4.1 and (if you don't insist on a separate patch) 4.2.

Thanks - Michael
Comment 4 Karolin Seeger 2015-03-15 21:02:15 UTC
(In reply to Michael Adam from comment #3)
Pushed to autobuild-v4-2-test.
Comment 5 Karolin Seeger 2015-03-15 21:03:26 UTC
(In reply to Karolin Seeger from comment #4)
Patch does not apply to current v4-1-test.
Comment 6 Christof Schmitt 2015-03-16 05:06:34 UTC
Michael, please confirm, since you mentioned 4.1, but as far as i can see, this problem only exists in 4.2 and master. So this patch is only necessary for 4.2.
Comment 7 Michael Adam 2015-03-16 08:14:16 UTC
Oh, indeed. I was just misled by the "Product: Samba 4.1 and newer" above..
It is correct that Samba 4.1 is not affected.

Michael
Comment 8 Karolin Seeger 2015-03-27 20:12:38 UTC
(In reply to Karolin Seeger from comment #4)
Pushed to v4-2-test.
Closing out bug report.

Thanks!