|
|
b51b82 |
diff -up Linux-PAM-1.3.1/libpam/include/pam_cc_compat.h.pam-cc-compat Linux-PAM-1.3.1/libpam/include/pam_cc_compat.h
|
|
|
b51b82 |
--- Linux-PAM-1.3.1/libpam/include/pam_cc_compat.h.pam-cc-compat 2022-05-26 10:43:50.436328027 +0200
|
|
|
b51b82 |
+++ Linux-PAM-1.3.1/libpam/include/pam_cc_compat.h 2022-05-26 10:43:50.436328027 +0200
|
|
|
b51b82 |
@@ -0,0 +1,47 @@
|
|
|
b51b82 |
+/*
|
|
|
b51b82 |
+ * Copyright (c) 2020 Dmitry V. Levin <ldv@altlinux.org>
|
|
|
b51b82 |
+ */
|
|
|
b51b82 |
+
|
|
|
b51b82 |
+#ifndef PAM_CC_COMPAT_H
|
|
|
b51b82 |
+#define PAM_CC_COMPAT_H
|
|
|
b51b82 |
+
|
|
|
b51b82 |
+#include "config.h"
|
|
|
b51b82 |
+#include <security/_pam_types.h>
|
|
|
b51b82 |
+
|
|
|
b51b82 |
+#if defined __clang__ && defined __clang_major__ && defined __clang_minor__
|
|
|
b51b82 |
+# define PAM_CLANG_PREREQ(maj, min) \
|
|
|
b51b82 |
+ ((__clang_major__ << 16) + __clang_minor__ >= ((maj) << 16) + (min))
|
|
|
b51b82 |
+#else
|
|
|
b51b82 |
+# define PAM_CLANG_PREREQ(maj, min) 0
|
|
|
b51b82 |
+#endif
|
|
|
b51b82 |
+
|
|
|
b51b82 |
+#if PAM_GNUC_PREREQ(4, 6)
|
|
|
b51b82 |
+# define DIAG_PUSH_IGNORE_CAST_QUAL \
|
|
|
b51b82 |
+ _Pragma("GCC diagnostic push"); \
|
|
|
b51b82 |
+ _Pragma("GCC diagnostic ignored \"-Wcast-qual\"")
|
|
|
b51b82 |
+# define DIAG_POP_IGNORE_CAST_QUAL \
|
|
|
b51b82 |
+ _Pragma("GCC diagnostic pop")
|
|
|
b51b82 |
+# define DIAG_PUSH_IGNORE_CAST_ALIGN \
|
|
|
b51b82 |
+ _Pragma("GCC diagnostic push"); \
|
|
|
b51b82 |
+ _Pragma("GCC diagnostic ignored \"-Wcast-align\"")
|
|
|
b51b82 |
+# define DIAG_POP_IGNORE_CAST_ALIGN \
|
|
|
b51b82 |
+ _Pragma("GCC diagnostic pop")
|
|
|
b51b82 |
+#elif PAM_CLANG_PREREQ(2, 6)
|
|
|
b51b82 |
+# define DIAG_PUSH_IGNORE_CAST_QUAL \
|
|
|
b51b82 |
+ _Pragma("clang diagnostic push"); \
|
|
|
b51b82 |
+ _Pragma("clang diagnostic ignored \"-Wcast-qual\"")
|
|
|
b51b82 |
+# define DIAG_POP_IGNORE_CAST_QUAL \
|
|
|
b51b82 |
+ _Pragma("clang diagnostic pop")
|
|
|
b51b82 |
+# define DIAG_PUSH_IGNORE_CAST_ALIGN \
|
|
|
b51b82 |
+ _Pragma("clang diagnostic push"); \
|
|
|
b51b82 |
+ _Pragma("clang diagnostic ignored \"-Wcast-align\"")
|
|
|
b51b82 |
+# define DIAG_POP_IGNORE_CAST_ALIGN \
|
|
|
b51b82 |
+ _Pragma("clang diagnostic pop")
|
|
|
b51b82 |
+#else
|
|
|
b51b82 |
+# define DIAG_PUSH_IGNORE_CAST_QUAL /* empty */
|
|
|
b51b82 |
+# define DIAG_POP_IGNORE_CAST_QUAL /* empty */
|
|
|
b51b82 |
+# define DIAG_PUSH_IGNORE_CAST_ALIGN /* empty */
|
|
|
b51b82 |
+# define DIAG_POP_IGNORE_CAST_ALIGN /* empty */
|
|
|
b51b82 |
+#endif
|
|
|
b51b82 |
+
|
|
|
b51b82 |
+#endif /* PAM_CC_COMPAT_H */
|
|
|
b51b82 |
diff -up Linux-PAM-1.3.1/libpam/Makefile.am.pam-cc-compat Linux-PAM-1.3.1/libpam/Makefile.am
|
|
|
b51b82 |
--- Linux-PAM-1.3.1/libpam/Makefile.am.pam-cc-compat 2022-05-26 10:43:50.436328027 +0200
|
|
|
b51b82 |
+++ Linux-PAM-1.3.1/libpam/Makefile.am 2022-05-26 10:44:00.865402730 +0200
|
|
|
b51b82 |
@@ -18,7 +18,7 @@ include_HEADERS = include/security/_pam_
|
|
|
b51b82 |
include/security/pam_ext.h include/security/pam_modutil.h
|
|
|
b51b82 |
|
|
|
b51b82 |
noinst_HEADERS = pam_prelude.h pam_private.h pam_tokens.h \
|
|
|
b51b82 |
- pam_modutil_private.h
|
|
|
b51b82 |
+ pam_modutil_private.h include/pam_cc_compat.h
|
|
|
b51b82 |
|
|
|
b51b82 |
libpam_la_LDFLAGS = -no-undefined -version-info 84:2:84
|
|
|
b51b82 |
libpam_la_LIBADD = @LIBAUDIT@ $(LIBPRELUDE_LIBS) @LIBDL@
|