aboutsummaryrefslogtreecommitdiff
path: root/src/libstore
diff options
context:
space:
mode:
Diffstat (limited to 'src/libstore')
-rw-r--r--src/libstore/derivations.cc2
-rw-r--r--src/libstore/s3-binary-cache-store.cc9
2 files changed, 10 insertions, 1 deletions
diff --git a/src/libstore/derivations.cc b/src/libstore/derivations.cc
index 5562d4689..d934bda38 100644
--- a/src/libstore/derivations.cc
+++ b/src/libstore/derivations.cc
@@ -155,7 +155,7 @@ static StringSet parseStrings(std::istream & str, bool arePaths)
static Derivation parseDerivation(const string & s)
{
Derivation drv;
- istringstream_nocopy str(s);
+ std::istringstream str(s);
expect(str, "Derive([");
/* Parse the list of outputs. */
diff --git a/src/libstore/s3-binary-cache-store.cc b/src/libstore/s3-binary-cache-store.cc
index 1bc8576a8..3c5101f00 100644
--- a/src/libstore/s3-binary-cache-store.cc
+++ b/src/libstore/s3-binary-cache-store.cc
@@ -18,6 +18,15 @@
namespace nix {
+struct istringstream_nocopy : public std::stringstream
+{
+ istringstream_nocopy(const std::string & s)
+ {
+ rdbuf()->pubsetbuf(
+ (char *) s.data(), s.size());
+ }
+};
+
struct S3Error : public Error
{
Aws::S3::S3Errors err;