From patchwork Fri Nov 8 19:47:39 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Laurent Pinchart X-Patchwork-Id: 2295 Return-Path: Received: from perceval.ideasonboard.com (perceval.ideasonboard.com [213.167.242.64]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id BE81A60180 for ; Fri, 8 Nov 2019 20:47:52 +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 378882D1 for ; Fri, 8 Nov 2019 20:47:52 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1573242472; bh=u5rV18DL3t3itZtWNNS3yUIjv2T0lw4iuNm8UggopI0=; h=From:To:Subject:Date:From; b=s4H3QGovukznWiqWmPQV2CF8+0Ml9kqRQ7dVxVKpW0Pvt9QpSX3cb2Kkpoz6EFAAp 2R8uw50tS/kJF6iR+jmZF7pTFLfQ/+XThZWRnvonRmfGa1d30RXhfQTTzhpkA31lPB lgBwGUqwCmP6jDklvOVNab3a8oiURokgbSKX6tOg= From: Laurent Pinchart To: libcamera-devel@lists.libcamera.org Date: Fri, 8 Nov 2019 21:47:39 +0200 Message-Id: <20191108194739.1632-1-laurent.pinchart@ideasonboard.com> X-Mailer: git-send-email 2.23.0 MIME-Version: 1.0 Subject: [libcamera-devel] [PATCH] libcamera: Fix compilation with uClibc and uClibc-ng 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, 08 Nov 2019 19:47:52 -0000 Neither uClibc nor uClibc-ng support O_TMPFILE. Define it in utils.h if not defined. Signed-off-by: Laurent Pinchart Reviewed-by: Niklas Söderlund --- src/libcamera/include/utils.h | 9 +++++++++ 1 file changed, 9 insertions(+) Is utils.h a good location, or should we create a compat.h (maybe even one that is automatically included) for this purpose ? diff --git a/src/libcamera/include/utils.h b/src/libcamera/include/utils.h index 3efb11c119c2..a80f7d096bf7 100644 --- a/src/libcamera/include/utils.h +++ b/src/libcamera/include/utils.h @@ -16,6 +16,15 @@ #define ARRAY_SIZE(a) (sizeof(a) / sizeof(a[0])) +#ifndef __DOXYGEN__ + +/* uClibc and uClibc-ng don't provide O_TMPFILE */ +#ifndef O_TMPFILE +#define O_TMPFILE (020000000 | O_DIRECTORY) +#endif + +#endif + namespace libcamera { namespace utils {