From c446aef1382cb1d42ab7a425acd758c3dbde8e14 Mon Sep 17 00:00:00 2001 From: Robert Konrad Date: Mon, 10 Jun 2024 19:12:51 +0200 Subject: [PATCH] Output an include guard for kong.h --- Sources/integrations/kinc.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/Sources/integrations/kinc.c b/Sources/integrations/kinc.c index f3b58e6..bcfe3f5 100644 --- a/Sources/integrations/kinc.c +++ b/Sources/integrations/kinc.c @@ -250,6 +250,9 @@ void kinc_export(char *directory, api_kind api) { FILE *output = fopen(filename, "wb"); + fprintf(output, "#ifndef KONG_INTEGRATION_HEADER\n"); + fprintf(output, "#define KONG_INTEGRATION_HEADER\n"); + fprintf(output, "#include \n"); fprintf(output, "#include \n"); fprintf(output, "#include \n"); @@ -315,6 +318,8 @@ void kinc_export(char *directory, api_kind api) { } } + fprintf(output, "#endif\n"); + fclose(output); }