From patchwork Mon Jan 7 15:54:27 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kieran Bingham X-Patchwork-Id: 161 Return-Path: Received: from perceval.ideasonboard.com (perceval.ideasonboard.com [213.167.242.64]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id 1276C600CC for ; Mon, 7 Jan 2019 16:54:32 +0100 (CET) Received: from localhost.localdomain (cpc89242-aztw30-2-0-cust488.18-1.cable.virginm.net [86.31.129.233]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id 64040E22; Mon, 7 Jan 2019 16:54:31 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1546876471; bh=VEQyNoE9xpTCIx8oPzNCtpmleNu5oGn1lPW2PhPM7Nk=; h=From:To:Cc:Subject:Date:From; b=stR+8fZPdCSC54MRQf7L7CsgQnLg29oREPtVaQryvO52ZuNs+UB04rD2ZhrmwVCHp 0wpHNyQNv44yXgcq1u9ziZb5ox1twRuvPvL9WehL0T9twb2QnpB8+NF+u3nm3CPkmN +K5aQ0QeYH5JsvmlHKAkVqr3NbQH1Y7JAnvrvQBE= From: Kieran Bingham To: LibCamera Devel , Jacopo Mondi Date: Mon, 7 Jan 2019 15:54:27 +0000 Message-Id: <20190107155427.10124-1-kieran.bingham@ideasonboard.com> X-Mailer: git-send-email 2.17.1 Subject: [libcamera-devel] [PATCH] libcamera: media_object: Undef major/minor system macros X-BeenThere: libcamera-devel@lists.libcamera.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 07 Jan 2019 15:54:32 -0000 GCC 7.3.0 defines conflicting macros within which are deprecated and removed in later versions. To support compilation with this toolchain, ensure that any previous definition is removed before the class definitions. Signed-off-by: Kieran Bingham --- src/libcamera/include/media_object.h | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/libcamera/include/media_object.h b/src/libcamera/include/media_object.h index 950a33286690..00772fd11234 100644 --- a/src/libcamera/include/media_object.h +++ b/src/libcamera/include/media_object.h @@ -12,6 +12,15 @@ #include +/* + * In the GNU C Library, "major" and "minor" are defined by . + * GCC 7.3.0 also defines this in for historical compatibility. + * To prevent conflicting with the major() and minor() member functions we + * unconditionally undef these here. + */ +#undef major +#undef minor + namespace libcamera { class MediaDevice;