diff --git a/src/internal.c b/src/internal.c index 80d028b6..d8c3f13b 100644 --- a/src/internal.c +++ b/src/internal.c @@ -368,7 +368,7 @@ WOLFSSH* SshInit(WOLFSSH* ssh, WOLFSSH_CTX* ctx) ssh->scpConfirmMsg = NULL; ssh->scpConfirmMsgSz = 0; ssh->scpRecvCtx = NULL; - #if !defined(SCP_USER_CALLBACKS) && !defined(NO_FILESYSTEM) + #if !defined(WOLFSSH_SCP_USER_CALLBACKS) && !defined(NO_FILESYSTEM) ssh->scpSendCtx = &(ssh->scpSendCbCtx); #else ssh->scpSendCtx = NULL; diff --git a/src/wolfscp.c b/src/wolfscp.c index 1a55c96b..85ae0aff 100644 --- a/src/wolfscp.c +++ b/src/wolfscp.c @@ -45,7 +45,7 @@ #include "src/misc.c" #endif -#if defined(NO_FILESYSTEM) && !defined(SCP_USER_CALLBACKS) +#if defined(NO_FILESYSTEM) && !defined(WOLFSSH_SCP_USER_CALLBACKS) #error "scp with no filesystem requires user callbacks" #endif @@ -1338,7 +1338,7 @@ void* wolfSSH_GetScpSendCtx(WOLFSSH* ssh) } -#if !defined(SCP_USER_CALLBACKS) && !defined(NO_FILESYSTEM) +#if !defined(WOLFSSH_SCP_USER_CALLBACKS) && !defined(NO_FILESYSTEM) /* for porting to systems without errno */ static INLINE int wolfSSH_LastError(void) @@ -1986,7 +1986,7 @@ int wsScpSendCallback(WOLFSSH* ssh, int state, const char* peerRequest, return ret; } -#endif /* SCP_USER_CALLBACKS */ +#endif /* WOLFSSH_SCP_USER_CALLBACKS */ #endif /* WOLFSSH_SCP */ diff --git a/wolfssh/internal.h b/wolfssh/internal.h index 01f25060..8c312101 100644 --- a/wolfssh/internal.h +++ b/wolfssh/internal.h @@ -289,7 +289,7 @@ struct WOLFSSH { word32 scpBufferedSz; /* bytes buffered to send to peer */ void* scpRecvCtx; /* SCP receive callback context handle */ void* scpSendCtx; /* SCP send callback context handle */ - #if !defined(SCP_USER_CALLBACKS) && !defined(NO_FILESYSTEM) + #if !defined(WOLFSSH_SCP_USER_CALLBACKS) && !defined(NO_FILESYSTEM) ScpSendCtx scpSendCbCtx; /* used in default case to for send cb ctx */ #endif #endif diff --git a/wolfssh/port.h b/wolfssh/port.h index e570413c..3bd0aa46 100644 --- a/wolfssh/port.h +++ b/wolfssh/port.h @@ -58,7 +58,8 @@ extern "C" { #define WREWIND(s) rewind((s)) #define WSEEK_END SEEK_END - #if defined(WOLFSSH_SCP) && !defined(SCP_USER_CALLBACKS) + #if defined(WOLFSSH_SCP) && !defined(WOLFSSH_SCP_USER_CALLBACKS) && \ + !defined(NO_FILESYSTEM) /* for chdir() */ #include /* for mkdir() */ diff --git a/wolfssh/wolfscp.h b/wolfssh/wolfscp.h index b1efef48..dae978cb 100644 --- a/wolfssh/wolfscp.h +++ b/wolfssh/wolfscp.h @@ -51,7 +51,7 @@ extern "C" { #define DEFAULT_SCP_BUFFER_SZ DEFAULT_MAX_PACKET_SZ #endif -#if !defined(SCP_USER_CALLBACKS) && !defined(NO_FILESYSTEM) +#if !defined(WOLFSSH_SCP_USER_CALLBACKS) && !defined(NO_FILESYSTEM) /* for utimes() */ #include #include @@ -69,7 +69,7 @@ extern "C" { struct ScpDir* next; /* previous directory in stack */ } ScpDir; -#endif /* SCP_USER_CALLBACKS */ +#endif /* WOLFSSH_SCP_USER_CALLBACKS */ enum WS_ScpFileStates { /* sink */