Kouhei Sutou
null+****@clear*****
Thu Oct 4 10:39:17 JST 2012
Kouhei Sutou 2012-03-19 09:51:20 +0900 (Mon, 19 Mar 2012) New Revision: db8d4b9ed36c8aa72473efaf2bc4c9061720e6a4 https://github.com/mroonga/mroonga/commit/db8d4b9ed36c8aa72473efaf2bc4c9061720e6a4 Log: solaris: use stat() instead of dirent.d_type Reported by Kazuhiko Shiozaki. Thanks!!! Modified files: ha_mroonga.cc Modified: ha_mroonga.cc (+5 -1) =================================================================== --- ha_mroonga.cc 2012-03-18 19:03:06 +0900 (27b6160) +++ ha_mroonga.cc 2012-03-19 09:51:20 +0900 (918774e) @@ -7152,7 +7152,11 @@ void ha_mroonga::remove_grn_obj_force(const char *name) DIR *dir = opendir("."); if (dir) { while (struct dirent *entry = readdir(dir)) { - if (entry->d_type != DT_REG) { + struct stat file_status; + if (stat(entry->d_name, &file_status) != 0) { + continue; + } + if (!((file_status.st_mode & S_IFMT) && S_IFREG)) { continue; } if (strncmp(entry->d_name, path, path_length) == 0) { -------------- next part -------------- HTML����������������������������...Download