teknoraver / rpms / systemd

Forked from rpms/systemd 3 months ago
Clone

Blame 0008-headers-check-that-__INCLUDE_LEVEL__-is-defined-befo.patch

Zbigniew Jędrzejewski-Szmek f4a676
From cc60212ef3acc982eb0da5f2e6839af84a3a2f10 Mon Sep 17 00:00:00 2001
Michal Sekletar f5f073
From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= <zbyszek@in.waw.pl>
Michal Sekletar f5f073
Date: Mon, 13 Mar 2017 03:11:24 -0400
Michal Sekletar f5f073
Subject: [PATCH] headers: check that __INCLUDE_LEVEL__ is defined before using
Michal Sekletar f5f073
 it (#5575)
Michal Sekletar f5f073
Michal Sekletar f5f073
That macro is a gcc extension, and while widely supported, not ubiquitous.
Michal Sekletar f5f073
In particular the coverity scanner is having trouble with it.
Michal Sekletar f5f073
(cherry picked from commit 1070d271fa8fa553d57dd5f74dd1e3f60732d0b9)
Michal Sekletar f5f073
---
Michal Sekletar f5f073
 src/systemd/_sd-common.h | 4 ++--
Michal Sekletar f5f073
 1 file changed, 2 insertions(+), 2 deletions(-)
Michal Sekletar f5f073
Michal Sekletar f5f073
diff --git a/src/systemd/_sd-common.h b/src/systemd/_sd-common.h
Zbigniew Jędrzejewski-Szmek f4a676
index 3bb886be75..97c3943861 100644
Michal Sekletar f5f073
--- a/src/systemd/_sd-common.h
Michal Sekletar f5f073
+++ b/src/systemd/_sd-common.h
Michal Sekletar f5f073
@@ -22,8 +22,8 @@
Michal Sekletar f5f073
 
Michal Sekletar f5f073
 /* This is a private header; never even think of including this directly! */
Michal Sekletar f5f073
 
Michal Sekletar f5f073
-#if __INCLUDE_LEVEL__ <= 1
Michal Sekletar f5f073
-#error "Do not include _sd-common.h directly; it is a private header."
Michal Sekletar f5f073
+#if defined(__INCLUDE_LEVEL__) && __INCLUDE_LEVEL__ <= 1
Michal Sekletar f5f073
+#  error "Do not include _sd-common.h directly; it is a private header."
Michal Sekletar f5f073
 #endif
Michal Sekletar f5f073
 
Michal Sekletar f5f073
 #ifndef _sd_printf_