From ee523b505c1752fa3e94e9a85259e5935a03a9b2 Mon Sep 17 00:00:00 2001 From: =?utf8?q?C=C3=A9dric=20Villemain?= Date: Thu, 1 Dec 2011 12:02:04 +0100 Subject: [PATCH] Little fix for 8.3 compat USE_POSIX_FADVISE is first define in 8.4 so we need to add the define here. Idea behind is that we can just remove code when 8.3 is EOL. --- pgfincore.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/pgfincore.c b/pgfincore.c index afcbde8..4e074cd 100644 --- a/pgfincore.c +++ b/pgfincore.c @@ -135,6 +135,9 @@ static int pgfincore_file(char *filename, pgfincoreStruct *pgfncr); * and support 8.3, 8.4 and 9.0 */ #if PG_MAJOR_VERSION == 803 +#if defined(HAVE_DECL_POSIX_FADVISE) +#define USE_POSIX_FADVISE +#endif char *text_to_cstring(const text *t); text *cstring_to_text(const char *s); text *cstring_to_text_with_len(const char *s, int len); @@ -225,7 +228,7 @@ pgsysconf(PG_FUNCTION_ARGS) PG_RETURN_DATUM( HeapTupleGetDatum(tuple) ); } -#ifdef USE_POSIX_FADVISE +#if defined(USE_POSIX_FADVISE) /* * pgfadvise_file */ @@ -478,7 +481,7 @@ pgfadvise(PG_FUNCTION_ARGS) } } -#ifdef USE_POSIX_FADVISE +#if defined(USE_POSIX_FADVISE) /* * pgfadvise_file */ -- 2.39.5