[Bf-committers] error: 'struct dirent' has no member named 'd_type'
panda kunfu
kunfupanda911 at gmail.com
Sat Jun 9 13:12:27 CEST 2012
hi all,
I m getting below error while compiling blender 2.63a on solaris 10 (SPARC)
/data/blender-2.63a/source/blender/blenlib/intern/fileops.c:501:13: error:
'struct dirent' has no member named 'd_type'
/data/blender-2.63a/source/blender/blenlib/intern/fileops.c:501:25: error:
'DT_DIR' undeclared (first use in this function)
/data/blender-2.63a/source/blender/blenlib/intern/fileops.c:501:25: note:
each undeclared identifier is reported only once for each function it
appears in
gmake[2]: ***
[source/blender/blenlib/CMakeFiles/bf_blenlib.dir/intern/fileops.c.o] Error
1
gmake[1]: *** [source/blender/blenlib/CMakeFiles/bf_blenlib.dir/all] Error 2
gmake[1]: *** Waiting for unfinished jobs....
the code referred by this error is
======================================================================================
for (i = 0; i < n; i++) {
struct dirent *dirent = dirlist[i];
if (!strcmp(dirent->d_name, ".") || !strcmp(dirent->d_name,
"..")) {
free(dirent);
continue;
}
join_dirfile_alloc(&from_path, &from_alloc_len, from,
dirent->d_name);
if (to)
join_dirfile_alloc(&to_path, &to_alloc_len, to,
dirent->d_name);
if (dirent->d_type == DT_DIR) {
/* recursively dig into a folder */
ret = recursive_operation(from_path, to_path,
callback_dir_pre, callback_file, callback_dir_post);
}
else if (callback_file) {
/* call file callback for current path */
ret = callback_file(from_path, to_path);
if (ret != recursiveOp_Callback_OK)
ret = -1;
}
if (ret != 0) {
while (i < n)
free(dirlist[i]);
break;
}
}
==================================================================================================================
More information about the Bf-committers
mailing list