Copying gluster-devel@ Thanks for reporting Michael. I guess we need to forward port that old change. Can you please send out a patch to gerrit? Thanks! On 7/16/14, 2:36 AM, 马忠 wrote: > Hi Avati, > > I tried to build the latest glusterfs 3.5.1 on solaris11.1, but > it stopped because of missing sys/cdefs.h > > I've checked the Changelog and found the > "commit a5301c874f978570187c3543b0c3a4ceba143c25" had once > > solved such a problem in the obsolete file > "libglusterfsclient/src/libglusterfsclient.h". I don't understand why > > it appeared again in the later added file "api/src/glfs.h". Can you give > me any suggestion about this problem? thanks. > > ---------------------------------------------------------------------------------------------- > > [root@localhost glusterfs]# git show > a5301c874f978570187c3543b0c3a4ceba143c25 > > commit a5301c874f978570187c3543b0c3a4ceba143c25 > > Author: Anand V. Avati <avati@xxxxxxxxxxxxxxx> > > Date: Mon May 18 17:24:16 2009 +0530 > > workaround for not including sys/cdefs.h -- including sys/cdefs.h > breaks build on solaris and other platforms > > diff --git a/libglusterfsclient/src/libglusterfsclient.h > b/libglusterfsclient/src/libglusterfsclient.h > > index 1c2441b..5376985 100755 > > --- a/libglusterfsclient/src/libglusterfsclient.h > > +++ b/libglusterfsclient/src/libglusterfsclient.h > > @@ -20,7 +20,22 @@ > > #ifndef _LIBGLUSTERFSCLIENT_H > > #define _LIBGLUSTERFSCLIENT_H > > -#include <sys/cdefs.h> > > +#ifndef __BEGIN_DECLS > > +#ifdef __cplusplus > > +#define __BEGIN_DECLS extern "C" { > > +#else > > ----------------------------------------------------------------------------- > > root@solaris:~/glusterfs-3.5.1# gmake > > .... > > .... > > gmake[3]: Entering directory `/root/glusterfs-3.5.1/api/src' > > CC libgfapi_la-glfs.lo > > In file included from glfs.c:50: > > glfs.h:41:23: sys/cdefs.h: No such file or directory > > In file included from glfs.c:50: > > glfs.h:57: error: syntax error before "struct" > > In file included from glfs.c:51: > > glfs-internal.h:57: error: syntax error before "struct" > > gmake[3]: *** [libgfapi_la-glfs.lo] Error 1 > > gmake[3]: Leaving directory `/root/glusterfs-3.5.1/api/src' > > gmake[2]: *** [all-recursive] Error 1 > > gmake[2]: Leaving directory `/root/glusterfs-3.5.1/api' > > gmake[1]: *** [all-recursive] Error 1 > > gmake[1]: Leaving directory `/root/glusterfs-3.5.1' > > gmake: *** [all] Error 2 > > ------------------ > > Thanks in advance, > > Michael > _______________________________________________ Gluster-devel mailing list Gluster-devel@xxxxxxxxxxx http://supercolony.gluster.org/mailman/listinfo/gluster-devel