From: Francois Gouget Subject: [2/3] widl: Fix handling of circular imports that involve the file passed on the command line. Message-Id: Date: Sat, 23 May 2015 17:18:04 +0200 (CEST) --- tools/widl/parser.l | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tools/widl/parser.l b/tools/widl/parser.l index b911186..2333687 100644 --- a/tools/widl/parser.l +++ b/tools/widl/parser.l @@ -488,6 +488,9 @@ int do_import(char *fname) int ptr = import_stack_ptr; int ret, fd; + if (strcmp(import_stack_ptr ? import_stack[0].input_name : input_name, + fname) == 0) + return 0; /* initial source file */ import = first_import; while (import && strcmp(import->name, fname)) import = import->next; -- 2.1.4