[SCM] Samba Shared Repository - branch master updated

Christian Ambach ambi at samba.org
Tue Nov 26 12:24:41 MST 2013

Hi Jelmer,

Am 22.11.13 00:18, schrieb Jelmer Vernooij:

>> +/* for struct stat */
>> +#include <sys/stat.h>
>> +
> We generally try to keep platform-specific includes like this in
> lib/replace/system. Would it perhaps make sense to include
> system/filesys.h instead?

There is no real platform-specific include involved here, and I chose to
directly use sys/stat.h here as it is part of the Open Group standards
(and so it should be available virtually everywhere) and it is also
included directly at other places in the Samba source tree.
lib/replace/system/filesys.h also unconditionally includes <sys/stat.h>,
so I did not see the need to use the replace header.

AIX has some specialities, i.e. it redefines struct stat as struct
stat64 in the system headers and this is what caused the breakage here:
our header did some forward declaration and the code that implemented
the prototype then included the system header and so declared an
argument that was incompatible to the prototype.
IMHO, we should avoid forward declarations of system data structures to
prevent this from happening again.


More information about the samba-technical mailing list