Skip to content

Commit c37bd2f

Browse files
committed
Check ESPIPE
1 parent 757e30e commit c37bd2f

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

src/ssl_misc.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -230,12 +230,14 @@ static int wolfssl_file_len(XFILE fp, long* fileSz)
230230
/* Get file offset at end of file. */
231231
curr = (long)XFTELL(fp);
232232
if (curr < 0) {
233+
#ifdef ESPIPE
233234
if (errno == ESPIPE) {
234235
WOLFSSL_ERROR_MSG("wolfssl_file_len: file is a pipe");
235236
*fileSz = 0;
236237
ret = WOLFSSL_BAD_FILETYPE;
237238
}
238239
else
240+
#endif
239241
ret = WOLFSSL_BAD_FILE;
240242
}
241243
}

0 commit comments

Comments
 (0)