On 12/30/2011 12:19 PM, Paul Eggert wrote: > On 12/30/11 08:36, Eric Blake wrote: > >> unless you can declare struct rpl_stat with the same layout >> as struct stat, you have an API incompatibility that can cause >> compilation errors in various circumstances. > > Ah, sorry, I was assuming that we '#define stat rpl_stat' > before including the system <sys/stat.h>, so that 'struct stat' > becomes 'struct rpl_stat' everywhere. But we don't do that, > presumably because some <sys/stat.h>s #define stat > to something else, on their own.
Yes, most often to something like struct stat64; see commit 298d8b4 where this is a problem in practice that we had to work around for AIX. -- Eric Blake ebl...@redhat.com +1-919-301-3266 Libvirt virtualization library http://libvirt.org
signature.asc
Description: OpenPGP digital signature