The Samba-Bugzilla – Bug 5913
Build failure: Mismatching function declarations for ldb_search
Last modified: 2009-01-01 15:11:31 UTC
With a vanilla 3.2.4 source tree downloaded directly from samba.org, there is a difference in function declarations for ldb_search.
The declaration with the definition at source/lib/ldb/common/ldb.c:754 names the last parameter "_res" (leading underscore).
The declaration at source/lib/include/ldb.h:994 names the last parameter "res".
This causes a build error with at least GCC 4.2.2 that I'm using. Simply changing the name of the parameter in the ldb.h file to match the ldb.c file allows the build to proceed.
Perhaps (?probably?) there is a GCC switch that ignores the actual names of the parameters and does type checking only, but it is apparently not enabled.
Pushed the change to all branches.