From dd25457f40c7128f25c61537a4f4652b0798509a Mon Sep 17 00:00:00 2001 From: Ahsan Atta Date: Tue, 17 Feb 2026 17:24:10 +0000 Subject: [PATCH] Make cpa.h include guard more unique The CPA_H include guard is too generic and risks collisions when the header is included alongside other libraries. Rename it to CPA_QAT_H for a more project-specific guard. Also remove the redundant #ifndef CPA_H conditional wrappers around cpa.h as it has its own include guard to prevent double inclusion. This addresses GitHub issue intel/qatlib#139. Signed-off-by: Ahsan Atta --- quickassist/include/cpa.h | 6 +++--- quickassist/include/cpa_dev.h | 2 -- quickassist/include/dc/cpa_dc.h | 2 -- quickassist/include/rl/cpa_rl.h | 2 -- 4 files changed, 3 insertions(+), 9 deletions(-) diff --git a/quickassist/include/cpa.h b/quickassist/include/cpa.h index 14b68c1c..43b32def 100644 --- a/quickassist/include/cpa.h +++ b/quickassist/include/cpa.h @@ -38,8 +38,8 @@ * *****************************************************************************/ -#ifndef CPA_H -#define CPA_H +#ifndef CPA_QAT_H +#define CPA_QAT_H #ifdef __cplusplus extern "C" { @@ -1138,4 +1138,4 @@ CpaStatus cpaFreeInstance(CpaInstanceHandle instanceHandle); } /* close the extern "C" { */ #endif -#endif /* CPA_H */ +#endif /* CPA_QAT_H */ diff --git a/quickassist/include/cpa_dev.h b/quickassist/include/cpa_dev.h index fe075cd8..7b7dd714 100644 --- a/quickassist/include/cpa_dev.h +++ b/quickassist/include/cpa_dev.h @@ -36,9 +36,7 @@ extern "C" { #endif -#ifndef CPA_H #include "cpa.h" -#endif /***************************************************************************** * @ingroup cpaDev diff --git a/quickassist/include/dc/cpa_dc.h b/quickassist/include/dc/cpa_dc.h index 36089996..797d927b 100644 --- a/quickassist/include/dc/cpa_dc.h +++ b/quickassist/include/dc/cpa_dc.h @@ -46,9 +46,7 @@ extern "C" { #endif -#ifndef CPA_H #include "cpa.h" -#endif /** ***************************************************************************** diff --git a/quickassist/include/rl/cpa_rl.h b/quickassist/include/rl/cpa_rl.h index 4fa45a62..2ef8d117 100644 --- a/quickassist/include/rl/cpa_rl.h +++ b/quickassist/include/rl/cpa_rl.h @@ -54,9 +54,7 @@ extern "C" { #endif -#ifndef CPA_H #include "cpa.h" -#endif /** *****************************************************************************