Skip to content

Commit

Permalink
py/stream.h: Include sys/types.h to get size_t and off_t for POSIX API.
Browse files Browse the repository at this point in the history
  • Loading branch information
dlech authored and dpgeorge committed Mar 24, 2020
1 parent 58d9a48 commit 2f7d2bb
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions py/stream.h
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,7 @@ mp_uint_t mp_stream_rw(mp_obj_t stream, void *buf, mp_uint_t size, int *errcode,
void mp_stream_write_adaptor(void *self, const char *buf, size_t len);

#if MICROPY_STREAMS_POSIX_API
#include <sys/types.h>
// Functions with POSIX-compatible signatures
// "stream" is assumed to be a pointer to a concrete object with the stream protocol
ssize_t mp_stream_posix_write(void *stream, const void *buf, size_t len);
Expand Down

0 comments on commit 2f7d2bb

Please sign in to comment.