From bf07335a19d6192adaf4b1a817d2101ee0bad134 Mon Sep 17 00:00:00 2001 From: Christian Göttsche Date: Sun, 7 May 2023 20:57:06 +0200 Subject: modules: update Linux detection GCC and Clang only define the macro `linux` when using the GNU dialect of C (e.g. -std=gnu11 instead of -std=c11). Since `linux` is also not in a reserved namespace it might be target of collisions. Use the canonical macro `__linux__` instead (already used in pam_limits.c). --- modules/pam_namespace/pam_namespace.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'modules/pam_namespace') diff --git a/modules/pam_namespace/pam_namespace.h b/modules/pam_namespace/pam_namespace.h index 0b974ea7..a991b4c4 100644 --- a/modules/pam_namespace/pam_namespace.h +++ b/modules/pam_namespace/pam_namespace.h @@ -30,7 +30,7 @@ * DEALINGS IN THE SOFTWARE. */ -#if !(defined(linux)) +#ifndef __linux__ #error THIS CODE IS KNOWN TO WORK ONLY ON LINUX !!! #endif -- cgit v1.2.3