1010#include "../../../ballet/nanopb/pb_decode.h"
1111#include "generated/context.pb.h"
1212
13+ #if FD_HAS_FLATCC
1314#include "flatcc/flatcc_builder.h"
1415#include "flatbuffers/generated/context_reader.h"
16+ #endif
1517
1618FD_PROTOTYPES_BEGIN
1719
3739fd_solfuzz_pb_restore_features ( fd_features_t * features ,
3840 fd_exec_test_feature_set_t const * feature_set );
3941
42+ #if FD_HAS_FLATCC
4043/* Flatbuffers variant of the above. This function call should never
4144 fail (all passed in features should be supported). Throws FD_LOG_ERR
4245 if any unsupported features are inputted. */
4346void
4447fd_solfuzz_fb_restore_features ( fd_features_t * features ,
4548 SOL_COMPAT_NS (FeatureSet_table_t ) feature_set );
49+ #endif
4650
4751typedef ulong ( exec_test_run_pb_fn_t )( fd_solfuzz_runner_t * ,
4852 void const * ,
@@ -67,17 +71,19 @@ fd_solfuzz_pb_execute_wrapper( fd_solfuzz_runner_t * runner,
6771
6872typedef int ( exec_test_run_fb_fn_t )( fd_solfuzz_runner_t * , void const * );
6973
74+ #if FD_HAS_FLATCC
7075/* Returns SOL_COMPAT_V2_SUCCESS on success and SOL_COMPAT_V2_FAILURE on
7176 failure */
7277static inline int
7378fd_solfuzz_fb_execute_wrapper ( fd_solfuzz_runner_t * runner ,
7479 void const * input ,
7580 exec_test_run_fb_fn_t * exec_test_run_fn ) {
76- FD_SPAD_FRAME_BEGIN ( runner -> spad ) {
77- flatcc_builder_reset ( runner -> fb_builder );
78- return exec_test_run_fn ( runner , input );
79- } FD_SPAD_FRAME_END ;
81+ FD_SPAD_FRAME_BEGIN ( runner -> spad ) {
82+ flatcc_builder_reset ( runner -> fb_builder );
83+ return exec_test_run_fn ( runner , input );
84+ } FD_SPAD_FRAME_END ;
8085}
86+ #endif /* FD_HAS_FLATCC */
8187
8288/* Utils */
8389
0 commit comments