fix build failure on linux machines with fwd decl

This commit is contained in:
n-hutton 2025-02-20 15:55:43 +00:00
commit 982bef6705
7 changed files with 10 additions and 7 deletions

View file

@ -23,6 +23,8 @@
#include "fpga.h"
#include "lz4hc.h"
int fileno(FILE *);
#ifndef MIN
#define MIN(a,b) ((a) < (b) ? (a) : (b))
#endif
@ -356,6 +358,8 @@ static int FpgaGatherVersion(FILE *infile, char *infile_name, char *dst, int len
for (uint16_t i = 0; i < FPGA_BITSTREAM_FIXED_HEADER_SIZE; i++) {
if (fgetc(infile) != bitparse_fixed_header[i]) {
fprintf(stderr, "Invalid FPGA file. Aborting...\n\n");
fprintf(stderr, "File: %s\n", infile_name);
return (EXIT_FAILURE);
}
}