diff --git a/wolfssh/port.h b/wolfssh/port.h index 5e9571f9..c7886290 100644 --- a/wolfssh/port.h +++ b/wolfssh/port.h @@ -449,7 +449,8 @@ extern "C" { #define WFSEEK(fs,s,o,w) fseek((s),(o),(w)) #define WFTELL(fs,s) ftell((s)) #define WFSTAT(fs,fd,b) fstat((fd),(b)) - #define WREWIND(fs,s) rewind((s)) + #define WREWIND(fs,s) do { fseek((s),0,SEEK_SET); \ + clearerr((s)); } while (0) #define WSEEK_END SEEK_END #define WBADFILE NULL #define WSETTIME(fs,f,a,m) (0)