From 7c7373b81242613c1932c4d4ca7397c4bf66bc3c Mon Sep 17 00:00:00 2001 From: Tim Burke Date: Thu, 28 Aug 2025 15:31:09 -0700 Subject: [PATCH] Make header files more stand-alone If a header file references erasurecode_backend.h structures, it ought to include the header file. Note that the already-present #ifndef _ERASURECODE_BACKEND_H_ #define _ERASURECODE_BACKEND_H_ ... #endif // _ERASURECODE_BACKEND_H_ guards ensure we don't get multiple definitions. Change-Id: I5b8b63452b5751295cf89236693f98378f949e18 --- include/erasurecode/erasurecode_postprocessing.h | 2 ++ include/erasurecode/erasurecode_preprocessing.h | 2 ++ include/isa_l/isa_l_common.h | 2 ++ 3 files changed, 6 insertions(+) diff --git a/include/erasurecode/erasurecode_postprocessing.h b/include/erasurecode/erasurecode_postprocessing.h index 395700d..7585b04 100644 --- a/include/erasurecode/erasurecode_postprocessing.h +++ b/include/erasurecode/erasurecode_postprocessing.h @@ -29,6 +29,8 @@ #ifndef _ERASURECODE_POSTPROCESSING_H_ #define _ERASURECODE_POSTPROCESSING_H_ +#include "erasurecode_backend.h" + int finalize_fragments_after_encode(ec_backend_t instance, int k, int m, int blocksize, uint64_t orig_data_size, char **encoded_data, char **encoded_parity); diff --git a/include/erasurecode/erasurecode_preprocessing.h b/include/erasurecode/erasurecode_preprocessing.h index 7ca891d..73554eb 100644 --- a/include/erasurecode/erasurecode_preprocessing.h +++ b/include/erasurecode/erasurecode_preprocessing.h @@ -29,6 +29,8 @@ #ifndef _ERASURECODE_PREPROCESSING_H_ #define _ERASURECODE_PREPROCESSING_H_ +#include "erasurecode_backend.h" + int prepare_fragments_for_encode( ec_backend_t instance, int k, int m, diff --git a/include/isa_l/isa_l_common.h b/include/isa_l/isa_l_common.h index 0445544..30f18e6 100644 --- a/include/isa_l/isa_l_common.h +++ b/include/isa_l/isa_l_common.h @@ -27,6 +27,8 @@ * vi: set noai tw=79 ts=4 sw=4: */ +#include "erasurecode_backend.h" + #define ISA_L_W 8 /* Forward declarations */