Fix for problem with undeclared intptr_t type
commit1a53d8f88a452847b25f9689f9a08dbcf82c86e4
authorEsben Haabendal <esben@esben1.localdomain>
Fri, 15 Mar 2019 10:57:51 +0000 (15 11:57 +0100)
committerEsben Haabendal <esben@esben1.localdomain>
Fri, 15 Mar 2019 11:09:50 +0000 (15 12:09 +0100)
tree12c2ff882248d48bb5a91fdfdc26ec5c8d620fc7
parentd34132e62f666904158c7ec2f1eef5a9d5281c36
Fix for problem with undeclared intptr_t type

When building gnu-efi with old compilers with pre C90 compilers:

In file included from gnu-efi-3.0.9/lib/../inc/efilib.h:25:0,
                 from gnu-efi-3.0.9/lib/lib.h:24,
                 from gnu-efi-3.0.9/lib/dpath.c:25:
gnu-efi-3.0.9/lib/dpath.c: In function 'FileDevicePath':
gnu-efi-3.0.9/lib/../inc/efilink.h:145:47: error: 'intptr_t' undeclared (first use in this function)
 #define EFI_FIELD_OFFSET(TYPE,Field) ((UINTN)(intptr_t)(&(((TYPE *) 0)->Field)))

Problem introduced with commit a46a62b12b58139c31d4288384808365c4053bf2
(Fix some types gcc doesn't like).

Avoid this by adding intptr_t (and uintptr_t) typedefs for builds that does
not include stdint.h.

Signed-off-by: Esben Haabendal <esben@esben1.localdomain>
inc/aarch64/efibind.h
inc/arm/efibind.h
inc/ia32/efibind.h
inc/ia64/efibind.h
inc/mips64el/efibind.h
inc/x86_64/efibind.h