Fix linux build

This commit is contained in:
Michael Theall 2016-06-19 21:26:41 -05:00
parent 6d35bc0716
commit 540a73cb54

View File

@ -196,9 +196,7 @@ static ftp_command_t ftp_commands[] =
/*! number of ftp commands */
static const size_t num_ftp_commands = sizeof(ftp_commands)/sizeof(ftp_commands[0]);
#ifdef _3DS
static void update_free_space(void);
#endif
/*! compare ftp command descriptors
*
@ -538,6 +536,8 @@ ftp_session_open_file_write(ftp_session_t *session,
return -1;
}
update_free_space();
/* it's okay if this fails */
errno = 0;
rc = setvbuf(session->fp, session->file_buffer, _IOFBF, FILE_BUFFERSIZE);
@ -1405,11 +1405,11 @@ ftp_session_poll(ftp_session_t *session)
return ftp_session_destroy(session);
}
#ifdef _3DS
/* Update free space in status bar */
static void
update_free_space(void)
{
#ifdef _3DS
#define KiB (1024.0)
#define MiB (1024.0*KiB)
#define GiB (1024.0*MiB)
@ -1448,8 +1448,8 @@ update_free_space(void)
console_set_status("\x1b[0;%dH" GREEN "%s", 50-len, buffer);
}
}
#endif
}
/*! Update status bar */
static int