Skip to content

Commit

Permalink
fix for platformio whining about missing definition for size_t
Browse files Browse the repository at this point in the history
  • Loading branch information
tobozo committed May 1, 2023
1 parent d70ca1c commit b62e3a7
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 1 deletion.
1 change: 1 addition & 0 deletions src/ESP32-targz-lib.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2280,6 +2280,7 @@ bool TarGzUnpacker::tarGzStreamExpander( Stream *stream, fs::FS &destFS, const c
}

//log_d("unpack complete (%d bytes)", use_dict ? tarGzIO.gz_size : GzUpdateClass_Write_Offset );
// TODO: return actual uncompressed length

return len;
}
Expand Down
2 changes: 1 addition & 1 deletion src/ESP32-targz-lib.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -360,7 +360,7 @@ struct TarGzUnpacker : public TarUnpacker, public GzUnpacker
* size of the stream must be known in order to signal zlib inflator last chunk
*
* @param data Stream object, usually data from a tcp socket
* @param len total length of compressed data to read from stream
* @param len total length of compressed data to read from stream (actually ignored)
* @return size_t number of bytes processed from a stream
*/
size_t writeGzStream(Stream &data, size_t len);
Expand Down
3 changes: 3 additions & 0 deletions src/ESP32-targz.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@

// Figure out the fs::FS library to load for the **destination** filesystem


#if defined ESP32

#if defined DEST_FS_USES_SPIFFS
Expand Down Expand Up @@ -126,6 +127,8 @@
#define WARN_LIMITED_FS
#endif

#include <stddef.h> // platformio whines about missing definition for 'size_t' 🤦

// required filesystem helpers are declared outside the main library
// because ESP32/ESP8266 <FS.h> use different abstraction flavours :)
__attribute__((unused)) static size_t targzFreeBytesFn() {
Expand Down

0 comments on commit b62e3a7

Please sign in to comment.