version: mozc-0.13.464.102
target file: ipc/unix_ipc.cc
category: build fail
OS: FreeBSD 9-CURRENT / 8.1-RELEASE
CC: gcc 4.2.1 (FreeBSD default compiler)
1)
FreeBSD needs "sys/ucred.h". Please add it.
2)
In socket, FreeBSD uses the same way of MacOSX. Please add FreeBSD
as the same as OSX.
3)
Follow lines look strange.
----
if (!IsAbstractSocket(server_address_)) {
// Linux does not use files for IPC.
::chmod(server_address_.c_str(), 0600);
}
if (::bind(socket_, reinterpret_cast<sockaddr *>(&addr), sun_len) != 0) {
// The UNIX domain socket file (server_address_) already exists?
LOG(FATAL) << "bind() failed: " << strerror(errno);
return;
}
----
Is it should be as follow?
----
if (::bind(socket_, reinterpret_cast<sockaddr *>(&addr), sun_len) != 0) {
// The UNIX domain socket file (server_address_) already exists?
LOG(FATAL) << "bind() failed: " << strerror(errno);
return;
}
if (!IsAbstractSocket(server_address_)) {
// Linux does not use files for IPC.
::chmod(server_address_.c_str(), 0600);
}
----
At least in FreeBSD, this code change is needed.
Original issue reported on code.google.com by daichig...@gmail.com on 20 Sep 2010 at 3:43
Original issue reported on code.google.com by
daichig...@gmail.com
on 20 Sep 2010 at 3:43