diff --git a/http.c b/http.c index e9dc877..6f4bab0 100644 --- a/http.c +++ b/http.c @@ -313,6 +313,28 @@ http_strtolower(const char *input) } +#if PG_VERSION_NUM < 160000 +static char * +guc_strdup(int elevel, const char *src) +{ + char *data; + + data = pstrdup(src); + if (data == NULL) + ereport(elevel, + (errcode(ERRCODE_OUT_OF_MEMORY), + errmsg("out of memory"))); + return data; +} + +static void +guc_free(void *ptr) +{ + pfree(ptr); +} +#endif + + static void http_guc_init_opt(http_curlopt *opt) {