Solaris compatibility fixes.

This commit is contained in:
rakshasa
2012-03-26 23:18:10 +09:00
parent bb75f06c6d
commit d1ff1fe77c
6 changed files with 39 additions and 4 deletions
+5
View File
@@ -88,7 +88,12 @@ SCgi::open_named(const std::string& filename) {
char buffer[sizeof(sockaddr_un) + filename.size()];
sockaddr_un* sa = reinterpret_cast<sockaddr_un*>(buffer);
#ifdef __sun__
sa->sun_family = AF_UNIX;
#else
sa->sun_family = AF_LOCAL;
#endif
std::memcpy(sa->sun_path, filename.c_str(), filename.size() + 1);
if (!get_fd().open_local())