#include <unistd.h>

This commit is contained in:
jl777
2018-09-04 00:09:58 -11:00
parent f2d3ad1895
commit 4c41436966

View File

@@ -16,6 +16,7 @@
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <memory.h>
#include "cJSON.c"
char *nonportable_path(char *str)
@@ -55,7 +56,7 @@ void *loadfile(char *fname,uint8_t **bufp,long *lenp,long *allocsizep)
long filesize,buflen = *allocsizep;
uint8_t *buf = *bufp;
*lenp = 0;
if ( (fp= fopen(compatible_path(fname),"rb")) != 0 )
if ( (fp= fopen(portable_path(fname),"rb")) != 0 )
{
fseek(fp,0,SEEK_END);
filesize = ftell(fp);