diff --git a/README.md b/README.md index cf3812a..f694e67 100644 --- a/README.md +++ b/README.md @@ -216,7 +216,7 @@ docker run --rm --entrypoint cat my-sist2-image /root/sist2 > sist2-x64-linux 3. Install vcpkg dependencies ```bash - vcpkg install openblas curl[core,openssl] sqlite3[core,fts5] cpp-jwt pcre cjson brotli libarchive[core,bzip2,libxml2,lz4,lzma,lzo] pthread tesseract libxml2 libmupdf[ocr] gtest mongoose libmagic libraw gumbo ffmpeg[core,avcodec,avformat,swscale,swresample,webp,opus,mp3lame,vpx,zlib] + vcpkg install openblas curl[core,openssl] sqlite3[core,fts5,json1] cpp-jwt pcre cjson brotli libarchive[core,bzip2,libxml2,lz4,lzma,lzo] pthread tesseract libxml2 libmupdf[ocr] gtest mongoose libmagic libraw gumbo ffmpeg[core,avcodec,avformat,swscale,swresample,webp,opus,mp3lame,vpx,zlib] ``` 4. Build diff --git a/src/index/web.c b/src/index/web.c index 8bd5564..c1d6c16 100644 --- a/src/index/web.c +++ b/src/index/web.c @@ -206,7 +206,7 @@ response_t *web_put(const char *url, const char *data, int insecure) { curl_easy_setopt(curl, CURLOPT_WRITEFUNCTION, write_cb); curl_easy_setopt(curl, CURLOPT_CUSTOMREQUEST, "PUT"); curl_easy_setopt(curl, CURLOPT_USERAGENT, "sist2"); - curl_easy_setopt(curl, CURLOPT_DNS_USE_GLOBAL_CACHE, 0); + curl_easy_setopt(curl, CURLOPT_SHARE, 0); curl_easy_setopt(curl, CURLOPT_IPRESOLVE, CURLOPT_DNS_LOCAL_IP4); if (insecure) { curl_easy_setopt(curl, CURLOPT_SSL_VERIFYPEER, 0); diff --git a/src/sist.h b/src/sist.h index ba74c3d..44fcb81 100644 --- a/src/sist.h +++ b/src/sist.h @@ -61,7 +61,7 @@ static const int VersionPatch = 1; #define SIST_PLATFORM unknown #endif -#define EXPECTED_MONGOOSE_VERSION "7.7" +#define EXPECTED_MONGOOSE_VERSION "7.13" #define Q(x) #x #define QUOTE(x) Q(x) diff --git a/src/web/serve.c b/src/web/serve.c index b9af2f5..723817b 100644 --- a/src/web/serve.c +++ b/src/web/serve.c @@ -627,7 +627,7 @@ int check_auth0(struct mg_http_message *hm) { return TRUE; } -static void ev_router(struct mg_connection *nc, int ev, void *ev_data, UNUSED(void *fn_data)) { +static void ev_router(struct mg_connection *nc, int ev, void *ev_data) { if (ev == MG_EV_HTTP_MSG) { struct mg_http_message *hm = (struct mg_http_message *) ev_data; diff --git a/src/web/web_util.h b/src/web/web_util.h index 14274f9..b226f9e 100644 --- a/src/web/web_util.h +++ b/src/web/web_util.h @@ -18,7 +18,9 @@ __always_inline static char *web_address_to_string(struct mg_addr *addr) { static char address_to_string_buf[INET6_ADDRSTRLEN]; - return mg_ntoa(addr, address_to_string_buf, sizeof(address_to_string_buf)); + mg_snprintf(address_to_string_buf, sizeof(address_to_string_buf), "%I", addr); + + return address_to_string_buf; } void web_send_headers(struct mg_connection *nc, int status_code, size_t length, char *extra_headers); diff --git a/third-party/libscan/CMakeLists.txt b/third-party/libscan/CMakeLists.txt index d9e4650..bc9113e 100644 --- a/third-party/libscan/CMakeLists.txt +++ b/third-party/libscan/CMakeLists.txt @@ -127,10 +127,11 @@ find_library(GOMP_LIB NAMES libgomp.a gomp /usr/lib/gcc/aarch64-linux-gnu/12/ ) find_package(Leptonica CONFIG REQUIRED) -find_package(FFMPEG REQUIRED) find_package(libraw CONFIG REQUIRED) find_package(Freetype REQUIRED) +find_package(FFMPEG REQUIRED) +list(REMOVE_ITEM FFMPEG_LIBRARIES /usr/lib/x86_64-linux-gnu/libm.a) target_compile_options( scan @@ -185,7 +186,6 @@ target_link_libraries( ${WPD_LIB_DIR}/libwpd-0.9.a ${WPD_LIB_DIR}/libwpd-stream-0.9.a - ${FREETYPE_LIB} ${HARFBUZZ_LIB} ${JBIG2DEC_LIB}