1
0
mirror of https://github.com/hsoft/collapseos.git synced 2024-11-23 16:28:05 +11:00

cfspack: fix compilation error

Some compilers don't like assigning stdout statically.
This commit is contained in:
Virgil Dupras 2019-12-31 15:12:17 -05:00
parent 097c677641
commit 359991c005

View File

@ -11,7 +11,7 @@
#define PUTC(c) putc(c, spitstream)
static FILE *spitstream = stdout;
static FILE *spitstream = NULL;
void set_spit_stream(FILE *stream)
{
@ -27,6 +27,7 @@ int is_regular_file(char *path)
void spitempty()
{
if (spitstream == NULL) spitstream = stdout;
PUTC('C');
PUTC('F');
PUTC('S');
@ -37,6 +38,7 @@ void spitempty()
int spitblock(char *fullpath, char *fn)
{
if (spitstream == NULL) spitstream = stdout;
FILE *fp = fopen(fullpath, "r");
fseek(fp, 0, SEEK_END);
long fsize = ftell(fp);