From: Juergen Gross Date: Tue, 11 Jan 2022 14:58:00 +0000 (+0100) Subject: Split struct file definition from its usage X-Git-Tag: xen-4.17.0-rc4~43 X-Git-Url: http://xenbits.xensource.com/gitweb?a=commitdiff_plain;h=35cbce04ddc18a94b51a47ed3fbeef4a008dc298;p=mini-os.git Split struct file definition from its usage Make the struct file definition standalone and use it for the declaration of the files array. Signed-off-by: Juergen Gross Reviewed-by: Samuel Thibault --- diff --git a/include/lib.h b/include/lib.h index 39d6a18..a638bc9 100644 --- a/include/lib.h +++ b/include/lib.h @@ -181,7 +181,7 @@ struct evtchn_port_info { int bound; }; -extern struct file { +struct file { enum fd_type type; union { struct { @@ -236,7 +236,9 @@ extern struct file { #endif }; int read; /* maybe available for read */ -} files[]; +}; + +extern struct file files[]; int alloc_fd(enum fd_type type); void close_all_files(void);