summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Haller <thaller@redhat.com>2020-11-02 16:19:42 +0100
committerThomas Haller <thaller@redhat.com>2020-11-02 22:29:55 +0100
commit0152b5b2587d745a15a7b63cbdd7c246d5600658 (patch)
tree5ed91c0eae8958c6aae6ad159de07b4d12865a64
parent3263aefafebd8be4c43070732f9698b4a53ed371 (diff)
downloadNetworkManager-0152b5b2587d745a15a7b63cbdd7c246d5600658.tar.gz
shared: don't enforce unset G_LOG_DOMAIN in "nm-default.h"
When including <glib.h>, it will always define G_LOG_DOMAIN if it is not yet defined. Usually we want to include "nm-default.h" as very first header. In that case, <glib.h> is not yet included. Then the previous check #error works well. However, if we include "nm-default.h" in sources generated by glib-mkenums, then the generator first already includes <glib.h>, and thus defines G_LOG_DOMAIN. It does so for "libnm-core/nm-core-enum-types.c" and "libnm/nm-enum-types.c", where the #error would not trigger. But we will also include "nm-default.h" for "libnm-core/tests/nm-core-tests-enum-types.c". That will start triggering this #error. While in general we want to include "nm-default.h" first, we also need to support cases where <glib.h> gets included first. Thus this error is not useful. Remove it.
-rw-r--r--shared/nm-default.h3
1 files changed, 0 insertions, 3 deletions
diff --git a/shared/nm-default.h b/shared/nm-default.h
index 6338c8b8a6..b322f1d37d 100644
--- a/shared/nm-default.h
+++ b/shared/nm-default.h
@@ -73,9 +73,6 @@
#else
#error Need to define G_LOG_DOMAIN
#endif
-#elif defined(NETWORKMANAGER_COMPILATION_TEST) \
- || (NETWORKMANAGER_COMPILATION & NM_NETWORKMANAGER_COMPILATION_WITH_DAEMON)
- #error Do not define G_LOG_DOMAIN with NM_NETWORKMANAGER_COMPILATION_WITH_DAEMON
#endif
/*****************************************************************************/