Skip to content

Commit

Permalink
fix: show clear error message on older libcurl
Browse files Browse the repository at this point in the history
Closes #143
  • Loading branch information
steve-chavez committed Sep 3, 2024
1 parent de214de commit 37092ce
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
PG_CFLAGS = -Werror -Wno-declaration-after-statement
PG_CFLAGS = -std=c11 -Werror -Wno-declaration-after-statement
EXTENSION = pg_net
EXTVERSION = 0.10.0

Expand Down
4 changes: 4 additions & 0 deletions src/worker.c
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,10 @@

#include "util.h"

#define MIN_LIBCURL_VERSION_NUM 0x075300 // This is the 7.83.0 version in hex as defined in curl/curlver.h
_Static_assert(LIBCURL_VERSION_NUM, "libcurl >= 7.83.0 is required"); // test for older libcurl versions that don't even have LIBCURL_VERSION_NUM defined (e.g. libcurl 6.5).
_Static_assert(LIBCURL_VERSION_NUM >= MIN_LIBCURL_VERSION_NUM, "libcurl >= 7.83.0 is required");

PG_MODULE_MAGIC;

static char *guc_ttl = "6 hours";
Expand Down

0 comments on commit 37092ce

Please sign in to comment.