aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/bin/psql/psqlscan.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/bin/psql/psqlscan.h b/src/bin/psql/psqlscan.h
index d515ce34f23..4ff321866fc 100644
--- a/src/bin/psql/psqlscan.h
+++ b/src/bin/psql/psqlscan.h
@@ -32,7 +32,12 @@ typedef struct PsqlScanCallbacks
/* This pointer can be NULL if no variable substitution is wanted */
char *(*get_variable) (const char *varname, bool escape, bool as_ident);
/* Print an error message someplace appropriate */
+ /* (very old gcc versions don't support attributes on function pointers) */
+#if defined(__GNUC__) && __GNUC__ < 4
+ void (*write_error) (const char *fmt,...);
+#else
void (*write_error) (const char *fmt,...) pg_attribute_printf(1, 2);
+#endif
} PsqlScanCallbacks;