supabase / pg_net

A PostgreSQL extension that enables asynchronous (non-blocking) HTTP/HTTPS requests with SQL
https://supabase.github.io/pg_net
Apache License 2.0
213 stars 16 forks source link

fix: CURLINFO_RESPONSE_CODE datatype #131

Closed soedirgo closed 4 months ago

soedirgo commented 4 months ago

We should be using long instead of int: https://curl.se/libcurl/c/CURLINFO_RESPONSE_CODE.html

Error message when compiling:

src/worker.c: In function ‘worker_main’:
src/worker.c:355:57: error: call to ‘_curl_easy_getinfo_err_long’ declared with attribute warning: curl_easy_getinfo expects a pointer to long for this info [-Werror=attribute-warning]
  355 |                                                         curl_easy_getinfo(eh, CURLINFO_RESPONSE_CODE, &http_status_code);
      |                                                         ^