Merge pull request #238 from JacobBarthelmeh/compile

add SIZEOF_OFF_T guess to wolfsftp.c
pull/237/head
John Safranek 2020-02-10 16:08:09 -08:00 committed by GitHub
commit d7ef3efae9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 11 additions and 11 deletions

View File

@ -85,16 +85,6 @@ int wfopen(WFILE** f, const char* filename, const char* mode)
#if (defined(WOLFSSH_SFTP) || defined(WOLFSSH_SCP)) && \
!defined(NO_WOLFSSH_SERVER)
#ifndef SIZEOF_OFF_T
/* if not using autoconf then make a guess on off_t size based on sizeof
* long long */
#if defined(SIZEOF_LONG) && SIZEOF_LONG == 8
#define SIZEOF_OFF_T 8
#else
#define SIZEOF_OFF_T 4
#endif
#endif
#if defined(USE_WINDOWS_API) || defined(WOLFSSL_NUCLEUS) || \
defined(FREESCALE_MQX)

View File

@ -37,7 +37,6 @@
#include "src/misc.c"
#endif
/* enum for bit field with an ID of each of the state structures */
enum WS_SFTP_STATE_ID {
STATE_ID_ALL = 0, /* default to select all */

View File

@ -349,6 +349,17 @@ extern "C" {
#if (defined(WOLFSSH_SFTP) || defined(WOLFSSH_SCP)) && \
!defined(NO_WOLFSSH_SERVER)
#ifndef SIZEOF_OFF_T
/* if not using autoconf then make a guess on off_t size based on sizeof
* long long */
#if defined(SIZEOF_LONG) && SIZEOF_LONG == 8
#define SIZEOF_OFF_T 8
#else
#define SIZEOF_OFF_T 4
#endif
#endif
#ifdef WOLFSSL_NUCLEUS
#define WSTAT_T struct stat
#define WRMDIR(fs,d) (NU_Remove_Dir((d)) == NU_SUCCESS)?0:1