xen: fix build when !CONFIG_GRANT_TABLE
authorConnor Davis <connojdavis@gmail.com>
Mon, 17 May 2021 13:43:19 +0000 (15:43 +0200)
committerJan Beulich <jbeulich@suse.com>
Mon, 17 May 2021 13:43:19 +0000 (15:43 +0200)
Move struct grant_table; in grant_table.h above
ifdef CONFIG_GRANT_TABLE. This fixes the following:

/build/xen/include/xen/grant_table.h:84:50: error: 'struct grant_table'
declared inside parameter list will not be visible outside of this
definition or declaration [-Werror]
   84 | static inline int mem_sharing_gref_to_gfn(struct grant_table *gt,
      |

Signed-off-by: Connor Davis <connojdavis@gmail.com>
Acked-by: Jan Beulich <jbeulich@suse.com>
xen/include/xen/grant_table.h

index 63b6dc78f46a9fc4514e6f44b1985c5e4858787b..9f8b7e66c1a0cfbe0ce853c53c85b68292107db6 100644 (file)
 #include <public/grant_table.h>
 #include <asm/grant_table.h>
 
-#ifdef CONFIG_GRANT_TABLE
 struct grant_table;
 
+#ifdef CONFIG_GRANT_TABLE
+
 extern unsigned int opt_max_grant_frames;
 
 /* Create/destroy per-domain grant table context. */