chore(3p/nix): Clean up some unused defines
This commit is contained in:
parent
91ddc7603d
commit
699ab4e20a
5 changed files with 2 additions and 1529 deletions
12
third_party/nix/src/libstore/local-store.cc
vendored
12
third_party/nix/src/libstore/local-store.cc
vendored
|
@ -320,16 +320,6 @@ void LocalStore::openDB(State& state, bool create) {
|
|||
throw Error(format("cannot open Nix database '%1%'") % dbPath);
|
||||
}
|
||||
|
||||
#ifdef __CYGWIN__
|
||||
/* The cygwin version of sqlite3 has a patch which calls
|
||||
SetDllDirectory("/usr/bin") on init. It was intended to fix extension
|
||||
loading, which we don't use, and the effect of SetDllDirectory is
|
||||
inherited by child processes, and causes libraries to be loaded from
|
||||
/usr/bin instead of $PATH. This breaks quite a few things (e.g.
|
||||
checkPhase on openssh), so we set it back to default behaviour. */
|
||||
SetDllDirectoryW(L"");
|
||||
#endif
|
||||
|
||||
if (sqlite3_busy_timeout(db, 60 * 60 * 1000) != SQLITE_OK) {
|
||||
throwSQLiteError(db, "setting timeout");
|
||||
}
|
||||
|
@ -381,7 +371,6 @@ void LocalStore::openDB(State& state, bool create) {
|
|||
/* To improve purity, users may want to make the Nix store a read-only
|
||||
bind mount. So make the Nix store writable for this process. */
|
||||
void LocalStore::makeStoreWritable() {
|
||||
#if __linux__
|
||||
if (getuid() != 0) {
|
||||
return;
|
||||
}
|
||||
|
@ -401,7 +390,6 @@ void LocalStore::makeStoreWritable() {
|
|||
throw SysError(format("remounting %1% writable") % realStoreDir);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
const time_t mtimeStore = 1; /* 1 second into the epoch */
|
||||
|
|
8
third_party/nix/src/libstore/remote-store.cc
vendored
8
third_party/nix/src/libstore/remote-store.cc
vendored
|
@ -90,13 +90,7 @@ ref<RemoteStore::Connection> UDSRemoteStore::openConnection() {
|
|||
auto conn = make_ref<Connection>();
|
||||
|
||||
/* Connect to a daemon that does the privileged work for us. */
|
||||
conn->fd = socket(PF_UNIX,
|
||||
SOCK_STREAM
|
||||
#ifdef SOCK_CLOEXEC
|
||||
| SOCK_CLOEXEC
|
||||
#endif
|
||||
,
|
||||
0);
|
||||
conn->fd = socket(PF_UNIX, SOCK_STREAM | SOCK_CLOEXEC, 0);
|
||||
if (!conn->fd) {
|
||||
throw SysError("cannot create Unix domain socket");
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue