diff --git a/contrib/cube/cubedata.h b/contrib/cube/cubedata.h index 8bfcc6e99a2..006a6d2c8c4 100644 --- a/contrib/cube/cubedata.h +++ b/contrib/cube/cubedata.h @@ -62,6 +62,7 @@ typedef struct NDBOX /* for cubescan.l and cubeparse.y */ /* All grammar constructs return strings */ #define YYSTYPE char * +#define YY_TYPEDEF_YY_SCANNER_T typedef void *yyscan_t; /* in cubescan.l */ diff --git a/contrib/seg/segdata.h b/contrib/seg/segdata.h index 7bc7c83dca3..b55ff78880b 100644 --- a/contrib/seg/segdata.h +++ b/contrib/seg/segdata.h @@ -16,6 +16,7 @@ extern int significant_digits(const char *s); /* for segscan.l and segparse.y */ union YYSTYPE; +#define YY_TYPEDEF_YY_SCANNER_T typedef void *yyscan_t; /* in segscan.l */ diff --git a/src/backend/utils/adt/jsonpath_internal.h b/src/backend/utils/adt/jsonpath_internal.h index 71f885475dd..0d8b89abea2 100644 --- a/src/backend/utils/adt/jsonpath_internal.h +++ b/src/backend/utils/adt/jsonpath_internal.h @@ -22,6 +22,7 @@ typedef struct JsonPathString int total; } JsonPathString; +#define YY_TYPEDEF_YY_SCANNER_T typedef void *yyscan_t; #include "utils/jsonpath.h" diff --git a/src/include/bootstrap/bootstrap.h b/src/include/bootstrap/bootstrap.h index ccec9415acb..782a2829c71 100644 --- a/src/include/bootstrap/bootstrap.h +++ b/src/include/bootstrap/bootstrap.h @@ -56,6 +56,7 @@ extern void boot_get_type_io_data(Oid typid, Oid *typoutput); union YYSTYPE; +#define YY_TYPEDEF_YY_SCANNER_T typedef void *yyscan_t; extern int boot_yyparse(yyscan_t yyscanner); diff --git a/src/include/replication/syncrep.h b/src/include/replication/syncrep.h index b4134dbc91d..3fe44a880cf 100644 --- a/src/include/replication/syncrep.h +++ b/src/include/replication/syncrep.h @@ -101,7 +101,10 @@ extern void SyncRepUpdateSyncStandbysDefined(void); * in syncrep_gram.y and syncrep_scanner.l */ union YYSTYPE; +#ifndef YY_TYPEDEF_YY_SCANNER_T +#define YY_TYPEDEF_YY_SCANNER_T typedef void *yyscan_t; +#endif extern int syncrep_yyparse(yyscan_t yyscanner); extern int syncrep_yylex(union YYSTYPE *yylval_param, yyscan_t yyscanner); extern void syncrep_yyerror(yyscan_t yyscanner, const char *str); diff --git a/src/include/replication/walsender_private.h b/src/include/replication/walsender_private.h index a82ce33c083..f487d3ad9e9 100644 --- a/src/include/replication/walsender_private.h +++ b/src/include/replication/walsender_private.h @@ -126,7 +126,10 @@ extern void WalSndSetState(WalSndState state); * repl_scanner.l */ union YYSTYPE; +#ifndef YY_TYPEDEF_YY_SCANNER_T +#define YY_TYPEDEF_YY_SCANNER_T typedef void *yyscan_t; +#endif extern int replication_yyparse(yyscan_t yyscanner); extern int replication_yylex(union YYSTYPE *yylval_param, yyscan_t yyscanner); extern void replication_yyerror(yyscan_t yyscanner, const char *message) pg_attribute_noreturn();