]> xenbits.xensource.com Git - people/andrewcoop/xen.git/commitdiff
xen/elfstructs: Include xen/types.h
authorAndrew Cooper <andrew.cooper3@citrix.com>
Fri, 7 Mar 2025 14:40:27 +0000 (14:40 +0000)
committerAndrew Cooper <andrew.cooper3@citrix.com>
Wed, 12 Mar 2025 18:45:45 +0000 (18:45 +0000)
elfstructs.h needs the stdint.h types.  Two headers arrange this manually, but
elf.h and livepatch.h do not, which breaks source files whose headers are
properly sorted.

elfstructs.h is used by tools too, so limit this to Xen only.

Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
---
CC: Anthony PERARD <anthony.perard@vates.tech>
CC: Michal Orzel <michal.orzel@amd.com>
CC: Jan Beulich <jbeulich@suse.com>
CC: Julien Grall <julien@xen.org>
CC: Roger Pau Monné <roger.pau@citrix.com>
CC: Stefano Stabellini <sstabellini@kernel.org>
CC: Volodymyr Babchuk <Volodymyr_Babchuk@epam.com>
CC: Bertrand Marquis <bertrand.marquis@arm.com>
CC: Oleksii Kurochko <oleksii.kurochko@gmail.com>
CC: Shawn Anastasio <sanastasio@raptorengineering.com>
xen/include/xen/elfstructs.h
xen/include/xen/livepatch_elf.h
xen/include/xen/version.h

index eb6b87a823a89a7e56e8a61b3a5619099fec6de8..f64ecec01990a96a09b972321cd24aef3729593f 100644 (file)
  * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
 
+/* Outside of Xen, the includer must provide stdint.h or equivalent. */
+#ifdef __XEN__
+#include <xen/types.h>
+#endif
+
 typedef uint32_t       Elf32_Addr;     /* Unsigned program address */
 typedef uint32_t       Elf32_Off;      /* Unsigned file offset */
 typedef uint16_t       Elf32_Half;     /* Unsigned medium integer */
@@ -45,7 +50,7 @@ typedef uint64_t      Elf64_Xword;
 
 /*
  * e_ident[] identification indexes
- * See http://www.caldera.com/developers/gabi/2000-07-17/ch4.eheader.html 
+ * See http://www.caldera.com/developers/gabi/2000-07-17/ch4.eheader.html
  */
 #define EI_MAG0                0               /* file ID */
 #define EI_MAG1                1               /* file ID */
index 842111e1451808df5dd1c83999477fa40ae55ec4..a8aafecd34b170ec4a2d6d1da0c0a3270c534feb 100644 (file)
@@ -5,7 +5,6 @@
 #ifndef __XEN_LIVEPATCH_ELF_H__
 #define __XEN_LIVEPATCH_ELF_H__
 
-#include <xen/types.h>
 #include <xen/elfstructs.h>
 
 /* The following describes an Elf file as consumed by Xen Live Patch. */
index 4856ad1b446db6c0acbd7bd417ede3530fad9d92..bc69ec9fb029b635565727f49f16fc459bdf5cb2 100644 (file)
@@ -1,7 +1,6 @@
 #ifndef __XEN_VERSION_H__
 #define __XEN_VERSION_H__
 
-#include <xen/types.h>
 #include <xen/elfstructs.h>
 
 const char *xen_compile_date(void);