From e38703c4ae79643b723eae6ff002f3ad3e0d0870 Mon Sep 17 00:00:00 2001 From: Russ Garrett Date: Mon, 2 May 2016 20:13:40 +0100 Subject: [PATCH] Explicitly cast to an `off_t` On OS X the `off_t` claims to be a long long, and the definition of `min` complains about conflicting types. --- samplebuffer.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/samplebuffer.cpp b/samplebuffer.cpp index 3c81d53..6135c8e 100644 --- a/samplebuffer.cpp +++ b/samplebuffer.cpp @@ -37,7 +37,7 @@ template std::unique_ptr SampleBuffer::getSamples(off_t start, off_t length) { // TODO: base this on the actual history required - auto history = std::min(start, 256L); + auto history = std::min(start, (off_t)256); auto samples = src->getSamples(start - history, length + history); if (samples == nullptr) return nullptr;