Skip to content

Commit 37092ce

Browse files
committed
fix: show clear error message on older libcurl
Closes #143
1 parent de214de commit 37092ce

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
PG_CFLAGS = -Werror -Wno-declaration-after-statement
1+
PG_CFLAGS = -std=c11 -Werror -Wno-declaration-after-statement
22
EXTENSION = pg_net
33
EXTVERSION = 0.10.0
44

src/worker.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,10 @@
2525

2626
#include "util.h"
2727

28+
#define MIN_LIBCURL_VERSION_NUM 0x075300 // This is the 7.83.0 version in hex as defined in curl/curlver.h
29+
_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).
30+
_Static_assert(LIBCURL_VERSION_NUM >= MIN_LIBCURL_VERSION_NUM, "libcurl >= 7.83.0 is required");
31+
2832
PG_MODULE_MAGIC;
2933

3034
static char *guc_ttl = "6 hours";

0 commit comments

Comments
 (0)