Skip to content

Commit ddb6bee

Browse files
riptlripatel-fd
authored andcommitted
Fix build without flatcc
1 parent 43b71fe commit ddb6bee

File tree

2 files changed

+10
-2
lines changed

2 files changed

+10
-2
lines changed

src/flamenco/runtime/tests/fd_solfuzz_exec.c

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,9 @@
77
#include "generated/vm.pb.h"
88
#include "generated/elf.pb.h"
99

10+
#if FD_HAS_FLATCC
1011
#include "flatbuffers/generated/elf_reader.h"
12+
#endif
1113

1214
#include "../fd_executor_err.h"
1315
#include <assert.h>
@@ -392,6 +394,8 @@ fd_solfuzz_pb_vm_interp_fixture( fd_solfuzz_runner_t * runner,
392394
return ok;
393395
}
394396

397+
#if FD_HAS_FLATCC
398+
395399
/* Flatbuffers */
396400
static int
397401
sol_compat_fb_cmp_elf_loader( SOL_COMPAT_NS(ELFLoaderEffects_table_t) expected,
@@ -484,3 +488,5 @@ fd_solfuzz_fb_elf_loader_fixture( fd_solfuzz_runner_t * runner,
484488
return sol_compat_fb_cmp_elf_loader( expected, actual );
485489
} FD_SPAD_FRAME_END;
486490
}
491+
492+
#endif /* FD_HAS_FLATCC */

src/flamenco/runtime/tests/test_sol_compat.c

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ run_test1( fd_solfuzz_runner_t * runner,
7272
else if( strstr( path, "/block/fixtures/" ) ) type = FIXTURE_TYPE_PB_BLOCK;
7373
else if( strstr( path, "/elf_loader/fixtures_fb/" ) ) type = FIXTURE_TYPE_FB_ELF_LOADER;
7474
else {
75-
FD_LOG_WARNING(( "Unknown test type: %s", path ));
75+
FD_LOG_WARNING(( "Unsupported test type: %s", path ));
7676
return 0;
7777
}
7878
}
@@ -96,11 +96,13 @@ run_test1( fd_solfuzz_runner_t * runner,
9696
case FIXTURE_TYPE_PB_BLOCK:
9797
ok = fd_solfuzz_pb_block_fixture( runner, buf, file_sz );
9898
break;
99+
# if FD_HAS_FLATCC
99100
case FIXTURE_TYPE_FB_ELF_LOADER:
100101
ok = fd_solfuzz_fb_elf_loader_fixture( runner, buf );
101102
break;
103+
# endif
102104
default:
103-
FD_LOG_CRIT(( "unreachable code entered" ));
105+
FD_LOG_CRIT(( "unsupported fixture type (flatcc available?)" ));
104106
}
105107

106108
if( ok ) FD_LOG_INFO (( "OK %s", path ));

0 commit comments

Comments
 (0)