Hi all, Compiling Samba 3.0.14a on Solaris 9 with gcc 3.4.2 results in an error: --- Compiling libsmb/clifile.c libsmb/clifile.c: In function `cli_unix_stat': libsmb/clifile.c:265: error: `STAT_ST_BLOCKSIZE' undeclared (first use in this function) libsmb/clifile.c:265: error: (Each undeclared identifier is reported only once libsmb/clifile.c:265: error: for each function it appears in.) *** Error code 1 make: Fatal error: Command failed for target `libsmb/clifile.o' --- This error first occurred while compiling 3.0.8 ; 3.0.7 compiles OK. What could cause this error? Best regards, Remy Zandwijk
Gerald (Jerry) Carter
2005-Jul-06 14:45 UTC
[Samba] Error building Samba 3.0.14a on Solaris 9
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Remy Zandwijk wrote: | Hi all, | | Compiling Samba 3.0.14a on Solaris 9 with gcc 3.4.2 results in | an error: | | --- | Compiling libsmb/clifile.c | libsmb/clifile.c: In function `cli_unix_stat': | libsmb/clifile.c:265: error: `STAT_ST_BLOCKSIZE' undeclared | (first use in this function) | libsmb/clifile.c:265: error: (Each undeclared identifier is | reported only once | libsmb/clifile.c:265: error: for each function it appears in.) | *** Error code 1 | make: Fatal error: Command failed for target `libsmb/clifile.o' | --- | | This error first occurred while compiling 3.0.8 ; 3.0.7 compiles OK. | | What could cause this error? our bug. The attached patch should fix it. cheers, jerry ====================================================================Alleviating the pain of Windows(tm) ------- http://www.samba.org GnuPG Key ----- http://www.plainjoe.org/gpg_public.asc "I never saved anything for the swim back." Ethan Hawk in Gattaca -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.0 (GNU/Linux) Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org iD8DBQFCy+tOIR7qMdg1EfYRAgKmAKCp6UnrD3aGIW7rv2bTnjOfkg4OjQCeM/l/ AXRp+QtJ/F7XdQA1YjAoSzc=4UAN -----END PGP SIGNATURE----- -------------- next part -------------- Index: libsmb/clifile.c ==================================================================--- libsmb/clifile.c (revision 8183) +++ libsmb/clifile.c (working copy) @@ -262,7 +262,12 @@ sbuf->st_size = IVAL2_TO_SMB_BIG_UINT(rdata,0); /* total size, in bytes */ sbuf->st_blocks = IVAL2_TO_SMB_BIG_UINT(rdata,8); /* number of blocks allocated */ +#if defined (HAVE_STAT_ST_BLOCKS) && defined(STAT_ST_BLOCKSIZE) sbuf->st_blocks /= STAT_ST_BLOCKSIZE; +#else + /* assume 512 byte blocks */ + sbuf->st_blocks /= 512; +#endif sbuf->st_ctime = interpret_long_date(rdata + 16); /* time of last change */ sbuf->st_atime = interpret_long_date(rdata + 24); /* time of last access */ sbuf->st_mtime = interpret_long_date(rdata + 32); /* time of last modification */