Lines 42-47
Link Here
|
42 |
#include <rak/path.h> |
42 |
#include <rak/path.h> |
43 |
#include <torrent/exceptions.h> |
43 |
#include <torrent/exceptions.h> |
44 |
|
44 |
|
|
|
45 |
#ifdef __sun__ |
46 |
#include <sys/stat.h> |
47 |
#endif |
48 |
|
45 |
#include "directory.h" |
49 |
#include "directory.h" |
46 |
|
50 |
|
47 |
namespace utils { |
51 |
namespace utils { |
Lines 69-74
Link Here
|
69 |
return false; |
73 |
return false; |
70 |
|
74 |
|
71 |
struct dirent* entry; |
75 |
struct dirent* entry; |
|
|
76 |
#ifdef __sun__ |
77 |
struct stat s; |
78 |
#endif |
72 |
|
79 |
|
73 |
while ((entry = readdir(d)) != NULL) { |
80 |
while ((entry = readdir(d)) != NULL) { |
74 |
if ((flags & update_hide_dot) && entry->d_name[0] == '.') |
81 |
if ((flags & update_hide_dot) && entry->d_name[0] == '.') |
Lines 76-84
Link Here
|
76 |
|
83 |
|
77 |
iterator itr = base_type::insert(end(), value_type()); |
84 |
iterator itr = base_type::insert(end(), value_type()); |
78 |
|
85 |
|
|
|
86 |
#ifdef __sun__ |
87 |
stat(entry->d_name, &s); |
88 |
itr->d_fileno = entry->d_ino; |
89 |
itr->d_type = s.st_mode; |
90 |
#else |
79 |
itr->d_fileno = entry->d_fileno; |
91 |
itr->d_fileno = entry->d_fileno; |
80 |
itr->d_reclen = entry->d_reclen; |
92 |
//itr->d_reclen = entry->d_reclen; //This isn't used and screws up Solaris. |
|
|
93 |
//It's ignore time. |
81 |
itr->d_type = entry->d_type; |
94 |
itr->d_type = entry->d_type; |
|
|
95 |
#endif |
82 |
|
96 |
|
83 |
#ifdef DIRENT_NAMLEN_EXISTS_FOOBAR |
97 |
#ifdef DIRENT_NAMLEN_EXISTS_FOOBAR |
84 |
itr->d_name = std::string(entry->d_name, entry->d_name + entry->d_namlen); |
98 |
itr->d_name = std::string(entry->d_name, entry->d_name + entry->d_namlen); |