Bug 11140 - identifier redeclared: netlogon_creds_cli_context_tmp
Summary: identifier redeclared: netlogon_creds_cli_context_tmp
Status: RESOLVED FIXED
Alias: None
Product: Samba 4.1 and newer
Classification: Unclassified
Component: File services (show other bugs)
Version: 4.2.0
Hardware: All Solaris
: P5 normal (vote)
Target Milestone: ---
Assignee: Karolin Seeger
QA Contact: Samba QA Contact
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-03-06 17:03 UTC by Tom Schulz
Modified: 2015-03-27 20:07 UTC (History)
2 users (show)

See Also:


Attachments
Patch to make the .h file match the .c file (522 bytes, patch)
2015-03-09 15:23 UTC, Tom Schulz
no flags Details
Patch for 4.2 (1.41 KB, patch)
2015-03-20 16:08 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-06 17:03:22 UTC
I have been building 4.2.0 with the GNU C compiler but I decided to see how it works with the Sun C 5.11 compiler. The Sun compiler complains about a identifier being redeclared in libcli/auth/netlogon_creds_cli.c

The declaration in netlogon_creds_cli.h is:

NTSTATUS netlogon_creds_cli_context_tmp(const char *client_computer,
                                const char *client_account,
                                enum netr_SchannelType type,
                                enum dcerpc_AuthLevel auth_level,
                                uint32_t proposed_flags,
                                uint32_t required_flags,
                                const char *server_computer,
                                const char *server_netbios_domain,
                                TALLOC_CTX *mem_ctx,
                                struct netlogon_creds_cli_context **_context);



And the declaration in netlogon_creds_cli.c is:

NTSTATUS netlogon_creds_cli_context_tmp(const char *client_computer,
                                const char *client_account,
                                enum netr_SchannelType type,
                                uint32_t proposed_flags,
                                uint32_t required_flags,
                                enum dcerpc_AuthLevel auth_level,
                                const char *server_computer,
                                const char *server_netbios_domain,
                                TALLOC_CTX *mem_ctx,
                                struct netlogon_creds_cli_context **_context)

So they are different. It is strange that the GNU C compiler does not complain.
Comment 1 Tom Schulz 2015-03-09 15:23:33 UTC
Created attachment 10830 [details]
Patch to make the .h file match the .c file

I think that it does not matter which way this is defined, but both definitions have to match. Attached is a patch to make the .h file match the .c file. I expect that the GNU C compiler has been using the definition in the .c file, so this patch would not change anything in the case that the GNU compiler is used.
Comment 2 Christof Schmitt 2015-03-20 16:08:14 UTC
Created attachment 10896 [details]
Patch for 4.2

Cherry-picked and reviewed patch for 4.2.
The problem seems to only exist in 4.2, so no backport to 4.1 is required.
Comment 3 Michael Adam 2015-03-20 16:41:14 UTC
Comment on attachment 10896 [details]
Patch for 4.2

ACK
Comment 4 Michael Adam 2015-03-20 16:41:42 UTC
Karo, please push to 4.2.next

Thanks - Michael
Comment 5 Karolin Seeger 2015-03-23 20:08:53 UTC
Pushed to autobuild-v4-2-test.
Comment 6 Karolin Seeger 2015-03-27 20:07:34 UTC
(In reply to Karolin Seeger from comment #5)
Pushed to v4-2-test.
Closing out bug report.

Thanks!