Merge branch 'ca-derivation-data-types' of github.com:obsidiansystems/nix into misc-ca

This commit is contained in:
John Ericson 2020-07-27 15:00:28 +00:00
commit 387699fe7f
3 changed files with 4 additions and 3 deletions

View file

@ -21,13 +21,13 @@ clean-files += $(GCH) $(PCH)
ifeq ($(PRECOMPILE_HEADERS), 1) ifeq ($(PRECOMPILE_HEADERS), 1)
ifeq ($(CXX), g++) ifeq ($(findstring g++,$(CXX)), g++)
GLOBAL_CXXFLAGS_PCH += -include $(buildprefix)precompiled-headers.h -Winvalid-pch GLOBAL_CXXFLAGS_PCH += -include $(buildprefix)precompiled-headers.h -Winvalid-pch
GLOBAL_ORDER_AFTER += $(GCH) GLOBAL_ORDER_AFTER += $(GCH)
else ifeq ($(CXX), clang++) else ifeq ($(findstring clang++,$(CXX)), clang++)
GLOBAL_CXXFLAGS_PCH += -include-pch $(PCH) -Winvalid-pch GLOBAL_CXXFLAGS_PCH += -include-pch $(PCH) -Winvalid-pch

View file

@ -24,6 +24,7 @@ std::optional<StorePath> DerivationOutput::pathOpt(const Store & store, std::str
}, output); }, output);
} }
bool derivationIsCA(DerivationType dt) { bool derivationIsCA(DerivationType dt) {
switch (dt) { switch (dt) {
case DerivationType::Regular: return false; case DerivationType::Regular: return false;

View file

@ -1581,7 +1581,7 @@ AutoCloseFD createUnixDomainSocket(const Path & path, mode_t mode)
struct sockaddr_un addr; struct sockaddr_un addr;
addr.sun_family = AF_UNIX; addr.sun_family = AF_UNIX;
if (path.size() >= sizeof(addr.sun_path)) if (path.size() + 1 >= sizeof(addr.sun_path))
throw Error("socket path '%1%' is too long", path); throw Error("socket path '%1%' is too long", path);
strcpy(addr.sun_path, path.c_str()); strcpy(addr.sun_path, path.c_str());