diff options
author | Jan200101 <sentrycraft123@gmail.com> | 2021-12-23 20:52:20 +0100 |
---|---|---|
committer | Jan200101 <sentrycraft123@gmail.com> | 2021-12-23 20:52:20 +0100 |
commit | 60f28e2ca03bf4db8c939a4709ff2f5b0840c901 (patch) | |
tree | 33aac9abdd6a2d60acee13c8a8c8b9090430700d /src/mock/libcurl.c | |
parent | 170353856b4999f4987314080daa53466ca58583 (diff) | |
download | polecat-60f28e2ca03bf4db8c939a4709ff2f5b0840c901.tar.gz polecat-60f28e2ca03bf4db8c939a4709ff2f5b0840c901.zip |
clean up mock logic, improve names, allow mock without wine
Diffstat (limited to 'src/mock/libcurl.c')
-rw-r--r-- | src/mock/libcurl.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/mock/libcurl.c b/src/mock/libcurl.c index 359b15c..308e5e1 100644 --- a/src/mock/libcurl.c +++ b/src/mock/libcurl.c @@ -5,8 +5,10 @@ #include "../defines.h" +#ifdef WINE_ENABLED #include "wine_mock_tar_xz.h" #include "wine_json.h" +#endif typedef size_t (*callback_t)(const void*, size_t, size_t, void*); typedef int (*xfercallback_t)(void*, curl_off_t, curl_off_t, curl_off_t, curl_off_t); @@ -89,6 +91,7 @@ CURLcode curl_easy_perform(UNUSED CURL *easy_handle) size_t output_size = 0; debug_printf("[MOCK] %s(...)\n", __func__); +#ifdef WINE_ENABLED if (!strcmp(url, WINE_API)) { output = wine_json; @@ -99,6 +102,7 @@ CURLcode curl_easy_perform(UNUSED CURL *easy_handle) output = wine_mock_tar_xz; output_size = wine_mock_tar_xz_size; } +#endif if (output && data && callbackfunc) { |