Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 291229 | Differences between
and this patch

Collapse All | Expand All

(-)rtorrent-0.8.5/src/input/input_event.cc (-2 / +3 lines)
Lines 36-45 Link Here
36
36
37
#include "config.h"
37
#include "config.h"
38
38
39
#include <ncurses.h>
40
41
#include "input_event.h"
39
#include "input_event.h"
42
40
41
//ncurses.h must be included last since sys/mman.h on Solaris munges ERR.
42
#include <ncurses.h>
43
43
namespace input {
44
namespace input {
44
45
45
void
46
void
(-)rtorrent-0.8.5/src/input/path_input.cc (-1 / +11 lines)
Lines 42-48 Link Here
42
#include <rak/path.h>
42
#include <rak/path.h>
43
43
44
#include <sys/types.h>
44
#include <sys/types.h>
45
#include <sys/dir.h>
45
46
#ifdef __sun__
47
  #include <dirent.h>
48
  #include <sys/stat.h>
49
#else
50
  #include <sys/dir.h>
51
#endif
46
52
47
#include "path_input.h"
53
#include "path_input.h"
48
54
Lines 72-78 Link Here
72
78
73
struct _transform_filename {
79
struct _transform_filename {
74
  void operator () (utils::directory_entry& entry) {
80
  void operator () (utils::directory_entry& entry) {
81
#ifdef __sun__
82
    if (entry.d_type & S_IFDIR)
83
#else
75
    if (entry.d_type == DT_DIR)
84
    if (entry.d_type == DT_DIR)
85
#endif
76
      entry.d_name += '/';
86
      entry.d_name += '/';
77
  }
87
  }
78
};
88
};
(-)rtorrent-0.8.5/src/rpc/scgi.cc (+5 lines)
Lines 88-94 Link Here
88
  char buffer[sizeof(sockaddr_un) + filename.size()];
88
  char buffer[sizeof(sockaddr_un) + filename.size()];
89
  sockaddr_un* sa = reinterpret_cast<sockaddr_un*>(buffer);
89
  sockaddr_un* sa = reinterpret_cast<sockaddr_un*>(buffer);
90
90
91
#ifdef __sun__
92
  sa->sun_family = AF_UNIX;
93
#else
91
  sa->sun_family = AF_LOCAL;
94
  sa->sun_family = AF_LOCAL;
95
#endif
96
92
  std::memcpy(sa->sun_path, filename.c_str(), filename.size() + 1);
97
  std::memcpy(sa->sun_path, filename.c_str(), filename.size() + 1);
93
98
94
  if (!get_fd().open_local())
99
  if (!get_fd().open_local())
(-)rtorrent-0.8.5/src/signal_handler.cc (+5 lines)
Lines 39-44 Link Here
39
#include <stdexcept>
39
#include <stdexcept>
40
#include "signal_handler.h"
40
#include "signal_handler.h"
41
41
42
#ifdef __sun__
43
#include <iso/signal_iso.h>
44
//extern "C" void (*signal (int sig, void (*disp)(int)))(int);
45
#endif
46
42
SignalHandler::Slot SignalHandler::m_handlers[HIGHEST_SIGNAL];
47
SignalHandler::Slot SignalHandler::m_handlers[HIGHEST_SIGNAL];
43
48
44
void
49
void
(-)rtorrent-0.8.5/src/utils/directory.cc (-1 / +15 lines)
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);
(-)rtorrent-0.8.5/src/utils/directory.h (-1 / +1 lines)
Lines 49-55 Link Here
49
49
50
  // The name and types should match POSIX.
50
  // The name and types should match POSIX.
51
  uint32_t            d_fileno;
51
  uint32_t            d_fileno;
52
  uint32_t            d_reclen;
52
  //uint32_t            d_reclen; //Not used. Messes with Solaris.
53
  uint8_t             d_type;
53
  uint8_t             d_type;
54
54
55
  std::string         d_name;
55
  std::string         d_name;

Return to bug 291229