Prevent a segfault on Solaris in the test_fs.c due to differences in the

definition of the dirent object.

FossilOrigin-Name: 042738ad3b769ad70fd7603f928d5b94a952267d
This commit is contained in:
drh
2015-12-04 03:27:45 +00:00
parent 15427279c8
commit 2f5bfd959a
3 changed files with 11 additions and 8 deletions
+6 -6
View File
@@ -1,5 +1,5 @@
C Fix\stypos\sin\srequirements\stext\sand\supdate\srequirements\smarks.\s\sNo\schanges\nto\scode.
D 2015-12-03T22:33:55.362
C Prevent\sa\ssegfault\son\sSolaris\sin\sthe\stest_fs.c\sdue\sto\sdifferences\sin\sthe\ndefinition\sof\sthe\sdirent\sobject.
D 2015-12-04T03:27:45.044
F Makefile.in 28bcd6149e050dff35d4dcfd97e890cd387a499d
F Makefile.linux-gcc 7bc79876b875010e8c8f9502eb935ca92aa3c434
F Makefile.msc e8fdca1cb89a1b58b5f4d3a130ea9a3d28cb314d
@@ -366,7 +366,7 @@ F src/test_btree.c 2e9978eca99a9a4bfa8cae949efb00886860a64f
F src/test_config.c 48850687dd5abc8260e23835632511054ccae172
F src/test_demovfs.c 0de72c2c89551629f58486fde5734b7d90758852
F src/test_devsym.c e7498904e72ba7491d142d5c83b476c4e76993bc
F src/test_fs.c aab47ac456316502faa265daadf9ac832fea12b9
F src/test_fs.c 993c7eab65bed6add4bb48cca29775e963f710cf
F src/test_func.c 0d9c25956152adefee8881c6fadc8354793764d0
F src/test_hexio.c abfdecb6fa58c354623978efceb088ca18e379cd
F src/test_init.c 66b33120ffe9cd853b5a905ec850d51151337b32
@@ -1408,7 +1408,7 @@ F tool/vdbe_profile.tcl 246d0da094856d72d2c12efec03250d71639d19f
F tool/warnings-clang.sh f6aa929dc20ef1f856af04a730772f59283631d4
F tool/warnings.sh 48bd54594752d5be3337f12c72f28d2080cb630b
F tool/win/sqlite.vsix deb315d026cc8400325c5863eef847784a219a2f
P e6521a436d464a42b87a7d5ba5cc98235b92440a
R 846383f75bcba4c7d26192303dc02f09
P 8534a46c06601ad35b97caee442371f24c718d0f
R 3f397aa5ab8af4d521cc061fb2695078
U drh
Z be77de4336a8b095fa17ae32142959b3
Z 11a613e2a3c9a8773b81f1dda236b457
+1 -1
View File
@@ -1 +1 @@
8534a46c06601ad35b97caee442371f24c718d0f
042738ad3b769ad70fd7603f928d5b94a952267d
+4 -1
View File
@@ -202,7 +202,10 @@ static int fsdirBestIndex(sqlite3_vtab *tab, sqlite3_index_info *pIdxInfo){
*/
static int fsdirOpen(sqlite3_vtab *pVTab, sqlite3_vtab_cursor **ppCursor){
FsdirCsr *pCur;
pCur = (FsdirCsr*)sqlite3_malloc(sizeof(FsdirCsr));
/* Allocate an extra 256 bytes because it is undefined how big dirent.d_name
** is and we need enough space. Linux provides plenty already, but
** Solaris only provides one byte. */
pCur = (FsdirCsr*)sqlite3_malloc(sizeof(FsdirCsr)+256);
if( pCur==0 ) return SQLITE_NOMEM;
memset(pCur, 0, sizeof(FsdirCsr));
*ppCursor = &pCur->base;