Skip to content

Commit

Permalink
Clean up add'l OS warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
earlephilhower committed Dec 18, 2018
1 parent 413314f commit 4a23057
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
2 changes: 2 additions & 0 deletions build-cross.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ name=mklittlefs-$(git rev-parse --short HEAD)
rel=${rel:=-2.5.0}
subrel=${subrel:-2}

rf *.json *.gz *.zip

build ()
{(
TARGET_OS=${tgt} CC=${pfx}-gcc CXX=${pfx}-g++ STRIP=${pfx}-strip make clean mklittlefs${exe} BUILD_CONFIG_NAME="-arduino-esp8266" CPPFLAGS="-DSPIFFS_USE_MAGIC_LENGTH=0 -DSPIFFS_ALIGNED_OBJECT_INDEX_TABLES=1"
Expand Down
5 changes: 4 additions & 1 deletion main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,9 @@ extern "C" {
#include "littlefs/lfs.h"
}

#ifndef PATH_MAX
#define PATH_MAX 512
#endif

static std::vector<uint8_t> s_flashmem;

Expand Down Expand Up @@ -306,7 +309,7 @@ void listFiles(const char *path) {
}

if (it.type == LFS_TYPE_DIR) {
char newpath[LFS_NAME_MAX+1];
char newpath[PATH_MAX];
sprintf(newpath, "%s/%s", path, it.name);
listFiles(newpath);
} else {
Expand Down

0 comments on commit 4a23057

Please sign in to comment.