From patchwork Fri Mar 6 23:10:50 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Laurent Pinchart X-Patchwork-Id: 3034 Return-Path: Received: from perceval.ideasonboard.com (perceval.ideasonboard.com [213.167.242.64]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id 1D86B60427 for ; Sat, 7 Mar 2020 00:11:01 +0100 (CET) Received: from pendragon.bb.dnainternet.fi (81-175-216-236.bb.dnainternet.fi [81.175.216.236]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id 8B91724B for ; Sat, 7 Mar 2020 00:11:00 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1583536260; bh=bxEsOx/iKbU1H5CYPQ41exF+mbx+YABkQSzrPv4fTXs=; h=From:To:Subject:Date:From; b=oYu2xOP4tDN/Tn0Cvoowmi4BvgOphgl27/7/NmqSC+tf67XkE5LEnjrOlTKKtE7GP vdJE9IkAAlkHDoh3om36UyWUnxfutk61h3CoGv60Ha73V6YobT2ZVzudM2UHNlDO7e AYdijoV3j8q7xoehNBjYMuU8F13oMvSNgjbLJMoU= From: Laurent Pinchart To: libcamera-devel@lists.libcamera.org Date: Sat, 7 Mar 2020 01:10:50 +0200 Message-Id: <20200306231050.7986-1-laurent.pinchart@ideasonboard.com> X-Mailer: git-send-email 2.24.1 MIME-Version: 1.0 Subject: [libcamera-devel] [PATCH] libcamera: v4l2_videodevice: Don't use std::atomic specialization X-BeenThere: libcamera-devel@lists.libcamera.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 06 Mar 2020 23:11:01 -0000 The std::atomic_uint64_t specialization was missing from C++14, and only added to C++17 (see LWG 2441). It was treated as a Defect Report and backported to earlier C++ standards by gcc and clang, but is missing from libstdc++ shipped with gcc 5 and gcc 6. Fix the compilation error by using std::atomic instead. Fixes: 4e0d1eca10b7 ("libcamera: V4L2BufferCache: Improve cache eviction strategy") Signed-off-by: Laurent Pinchart Reviewed-by: Niklas Söderlund --- src/libcamera/include/v4l2_videodevice.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/libcamera/include/v4l2_videodevice.h b/src/libcamera/include/v4l2_videodevice.h index 04802012d531..d051c9060f09 100644 --- a/src/libcamera/include/v4l2_videodevice.h +++ b/src/libcamera/include/v4l2_videodevice.h @@ -9,6 +9,7 @@ #include #include +#include #include #include @@ -142,7 +143,7 @@ private: std::vector planes_; }; - std::atomic_uint64_t lastUsedCounter_; + std::atomic lastUsedCounter_; std::vector cache_; /* \todo Expose the miss counter through an instrumentation API. */ unsigned int missCounter_;