diff options
Diffstat (limited to 'lib')
31 files changed, 36 insertions, 2 deletions
@@ -55,7 +55,9 @@ #ifndef USE_HOSTCC #include <common.h> +#include <malloc.h> #include <ubi_uboot.h> +#include <dm/devres.h> #include <linux/bitops.h> #else diff --git a/lib/binman.c b/lib/binman.c index 1774bdf2e5..6cf6dcfdad 100644 --- a/lib/binman.c +++ b/lib/binman.c @@ -9,6 +9,7 @@ #include <common.h> #include <binman.h> #include <dm.h> +#include <malloc.h> struct binman_info { ofnode image; diff --git a/lib/bzip2/bzlib.c b/lib/bzip2/bzlib.c index 9262e4055e..377b269b06 100644 --- a/lib/bzip2/bzlib.c +++ b/lib/bzip2/bzlib.c @@ -1,5 +1,6 @@ #include <config.h> #include <common.h> +#include <malloc.h> #include <watchdog.h> /* diff --git a/lib/crypto/asymmetric_type.c b/lib/crypto/asymmetric_type.c index e04666c080..7aa55092ac 100644 --- a/lib/crypto/asymmetric_type.c +++ b/lib/crypto/asymmetric_type.c @@ -7,6 +7,7 @@ * Written by David Howells (dhowells@redhat.com) */ #ifndef __UBOOT__ +#include <dm/devres.h> #include <keys/asymmetric-subtype.h> #include <keys/asymmetric-parser.h> #endif @@ -14,6 +15,7 @@ #ifdef __UBOOT__ #include <linux/compat.h> #include <linux/ctype.h> +#include <linux/err.h> #include <linux/string.h> #else #include <linux/seq_file.h> diff --git a/lib/crypto/pkcs7_parser.c b/lib/crypto/pkcs7_parser.c index bf9e7e888f..f5dda1179f 100644 --- a/lib/crypto/pkcs7_parser.c +++ b/lib/crypto/pkcs7_parser.c @@ -7,6 +7,7 @@ #define pr_fmt(fmt) "PKCS7: "fmt #ifdef __UBOOT__ +#include <dm/devres.h> #include <linux/bitops.h> #include <linux/compat.h> #endif diff --git a/lib/crypto/public_key.c b/lib/crypto/public_key.c index 634377472f..8b4821767a 100644 --- a/lib/crypto/public_key.c +++ b/lib/crypto/public_key.c @@ -9,7 +9,9 @@ #define pr_fmt(fmt) "PKEY: "fmt #ifdef __UBOOT__ +#include <dm/devres.h> #include <linux/compat.h> +#include <linux/err.h> #else #include <linux/module.h> #include <linux/export.h> diff --git a/lib/crypto/rsa_helper.c b/lib/crypto/rsa_helper.c index aca627a4a6..cc0c0d6637 100644 --- a/lib/crypto/rsa_helper.c +++ b/lib/crypto/rsa_helper.c @@ -6,6 +6,7 @@ * Authors: Tadeusz Struk <tadeusz.struk@intel.com> */ #ifndef __UBOOT__ +#include <linux/compat.h> #include <linux/kernel.h> #include <linux/export.h> #endif diff --git a/lib/crypto/x509_cert_parser.c b/lib/crypto/x509_cert_parser.c index e6d2a426a0..4e41cffd23 100644 --- a/lib/crypto/x509_cert_parser.c +++ b/lib/crypto/x509_cert_parser.c @@ -6,6 +6,7 @@ */ #define pr_fmt(fmt) "X.509: "fmt +#include <dm/devres.h> #include <linux/kernel.h> #ifndef __UBOOT__ #include <linux/export.h> diff --git a/lib/crypto/x509_public_key.c b/lib/crypto/x509_public_key.c index 04bdb672b4..676c0df174 100644 --- a/lib/crypto/x509_public_key.c +++ b/lib/crypto/x509_public_key.c @@ -8,7 +8,9 @@ #define pr_fmt(fmt) "X.509: "fmt #ifdef __UBOOT__ #include <common.h> +#include <dm/devres.h> #include <linux/compat.h> +#include <linux/err.h> #include <linux/errno.h> #else #include <linux/module.h> diff --git a/lib/efi/efi.c b/lib/efi/efi.c index 7cba57b131..0c16a5fdd3 100644 --- a/lib/efi/efi.c +++ b/lib/efi/efi.c @@ -11,6 +11,7 @@ #include <common.h> #include <debug_uart.h> #include <errno.h> +#include <malloc.h> #include <linux/err.h> #include <linux/types.h> #include <efi.h> diff --git a/lib/efi/efi_app.c b/lib/efi/efi_app.c index af5a878fc3..7c64077d42 100644 --- a/lib/efi/efi_app.c +++ b/lib/efi/efi_app.c @@ -13,6 +13,7 @@ #include <debug_uart.h> #include <dm.h> #include <errno.h> +#include <malloc.h> #include <linux/err.h> #include <linux/types.h> #include <efi.h> diff --git a/lib/efi/efi_stub.c b/lib/efi/efi_stub.c index 6dd93ff435..7d650d512e 100644 --- a/lib/efi/efi_stub.c +++ b/lib/efi/efi_stub.c @@ -14,6 +14,7 @@ #include <efi.h> #include <efi_api.h> #include <errno.h> +#include <malloc.h> #include <ns16550.h> #include <asm/cpu.h> #include <asm/io.h> diff --git a/lib/efi_driver/efi_block_device.c b/lib/efi_driver/efi_block_device.c index cf02341931..33e66fcad2 100644 --- a/lib/efi_driver/efi_block_device.c +++ b/lib/efi_driver/efi_block_device.c @@ -29,6 +29,7 @@ */ #include <efi_driver.h> +#include <malloc.h> #include <dm/device-internal.h> #include <dm/root.h> diff --git a/lib/efi_driver/efi_uclass.c b/lib/efi_driver/efi_uclass.c index 25b27ece6d..f8badadf66 100644 --- a/lib/efi_driver/efi_uclass.c +++ b/lib/efi_driver/efi_uclass.c @@ -18,6 +18,7 @@ */ #include <efi_driver.h> +#include <malloc.h> /** * check_node_type() - check node type diff --git a/lib/efi_loader/efi_console.c b/lib/efi_loader/efi_console.c index 8494044799..ac0dec1146 100644 --- a/lib/efi_loader/efi_console.c +++ b/lib/efi_loader/efi_console.c @@ -7,6 +7,7 @@ #include <common.h> #include <charset.h> +#include <malloc.h> #include <time.h> #include <dm/device.h> #include <efi_loader.h> diff --git a/lib/efi_loader/efi_runtime.c b/lib/efi_loader/efi_runtime.c index df0485cdad..4b3c843b2c 100644 --- a/lib/efi_loader/efi_runtime.c +++ b/lib/efi_loader/efi_runtime.c @@ -11,6 +11,7 @@ #include <dm.h> #include <elf.h> #include <efi_loader.h> +#include <malloc.h> #include <rtc.h> #include <u-boot/crc.h> diff --git a/lib/fdtdec.c b/lib/fdtdec.c index 17051d409c..eb11fc898e 100644 --- a/lib/fdtdec.c +++ b/lib/fdtdec.c @@ -9,6 +9,7 @@ #include <dm.h> #include <hang.h> #include <init.h> +#include <malloc.h> #include <dm/of_extra.h> #include <env.h> #include <errno.h> @@ -224,7 +225,7 @@ int fdtdec_get_pci_vendev(const void *blob, int node, u16 *vendor, u16 *device) return -ENOENT; } -int fdtdec_get_pci_bar32(struct udevice *dev, struct fdt_pci_addr *addr, +int fdtdec_get_pci_bar32(const struct udevice *dev, struct fdt_pci_addr *addr, u32 *bar) { int barnum; diff --git a/lib/libavb/avb_cmdline.c b/lib/libavb/avb_cmdline.c index 684c512bb9..dd859d3467 100644 --- a/lib/libavb/avb_cmdline.c +++ b/lib/libavb/avb_cmdline.c @@ -7,6 +7,7 @@ #include "avb_sha.h" #include "avb_util.h" #include "avb_version.h" +#include <malloc.h> #define NUM_GUIDS 3 diff --git a/lib/libavb/avb_descriptor.c b/lib/libavb/avb_descriptor.c index 9f03b9777a..86b8d1b994 100644 --- a/lib/libavb/avb_descriptor.c +++ b/lib/libavb/avb_descriptor.c @@ -6,6 +6,7 @@ #include "avb_descriptor.h" #include "avb_util.h" #include "avb_vbmeta_image.h" +#include <malloc.h> bool avb_descriptor_validate_and_byteswap(const AvbDescriptor* src, AvbDescriptor* dest) { diff --git a/lib/libavb/avb_rsa.c b/lib/libavb/avb_rsa.c index bbf15626b8..d7bf8905be 100644 --- a/lib/libavb/avb_rsa.c +++ b/lib/libavb/avb_rsa.c @@ -12,6 +12,7 @@ #include "avb_sha.h" #include "avb_util.h" #include "avb_vbmeta_image.h" +#include <malloc.h> typedef struct IAvbKey { unsigned int len; /* Length of n[] in number of uint32_t */ diff --git a/lib/libavb/avb_slot_verify.c b/lib/libavb/avb_slot_verify.c index c0defdf9c9..58baf522fc 100644 --- a/lib/libavb/avb_slot_verify.c +++ b/lib/libavb/avb_slot_verify.c @@ -14,6 +14,7 @@ #include "avb_util.h" #include "avb_vbmeta_image.h" #include "avb_version.h" +#include <malloc.h> /* Maximum number of partitions that can be loaded with avb_slot_verify(). */ #define MAX_NUMBER_OF_LOADED_PARTITIONS 32 diff --git a/lib/libavb/avb_sysdeps_posix.c b/lib/libavb/avb_sysdeps_posix.c index 0bb0cc1498..6ffdb0b7eb 100644 --- a/lib/libavb/avb_sysdeps_posix.c +++ b/lib/libavb/avb_sysdeps_posix.c @@ -4,6 +4,7 @@ */ #include <hang.h> +#include <malloc.h> #include <stdarg.h> #include <stdlib.h> diff --git a/lib/libavb/avb_util.c b/lib/libavb/avb_util.c index 405d625351..94773b77e7 100644 --- a/lib/libavb/avb_util.c +++ b/lib/libavb/avb_util.c @@ -4,6 +4,7 @@ */ #include "avb_util.h" +#include <malloc.h> #include <stdarg.h> diff --git a/lib/linux_compat.c b/lib/linux_compat.c index 3f440deaa0..89a6fd6ec9 100644 --- a/lib/linux_compat.c +++ b/lib/linux_compat.c @@ -1,5 +1,6 @@ #include <common.h> +#include <malloc.h> #include <memalign.h> #include <linux/compat.h> diff --git a/lib/list_sort.c b/lib/list_sort.c index e841da53ee..beb7273fd3 100644 --- a/lib/list_sort.c +++ b/lib/list_sort.c @@ -1,4 +1,5 @@ #ifndef __UBOOT__ +#include <dm/devres.h> #include <linux/kernel.h> #include <linux/module.h> #include <linux/slab.h> @@ -8,6 +8,7 @@ #include <common.h> #include <lmb.h> +#include <malloc.h> #define LMB_ALLOC_ANYWHERE 0 diff --git a/lib/rsa/rsa-sign.c b/lib/rsa/rsa-sign.c index 5b5905aeb5..6400ef63d6 100644 --- a/lib/rsa/rsa-sign.c +++ b/lib/rsa/rsa-sign.c @@ -4,6 +4,7 @@ */ #include "mkimage.h" +#include <malloc.h> #include <stdio.h> #include <string.h> #include <image.h> diff --git a/lib/rsa/rsa-verify.c b/lib/rsa/rsa-verify.c index 82dc513260..326a5e4ea9 100644 --- a/lib/rsa/rsa-verify.c +++ b/lib/rsa/rsa-verify.c @@ -6,6 +6,7 @@ #ifndef USE_HOSTCC #include <common.h> #include <fdtdec.h> +#include <malloc.h> #include <asm/types.h> #include <asm/byteorder.h> #include <linux/errno.h> diff --git a/lib/string.c b/lib/string.c index 9b779ddc3b..ae7835f600 100644 --- a/lib/string.c +++ b/lib/string.c @@ -324,7 +324,6 @@ char * strdup(const char *s) strcpy (new, s); return new; } -#endif char * strndup(const char *s, size_t n) { @@ -348,6 +347,7 @@ char * strndup(const char *s, size_t n) return new; } +#endif #ifndef __HAVE_ARCH_STRSPN /** diff --git a/lib/zstd/decompress.c b/lib/zstd/decompress.c index ac5ab528bb..ae3be3f02a 100644 --- a/lib/zstd/decompress.c +++ b/lib/zstd/decompress.c @@ -23,6 +23,7 @@ #include "huf.h" #include "mem.h" /* low level memory routines */ #include "zstd_internal.h" +#include <malloc.h> #include <linux/kernel.h> #include <linux/compat.h> #include <linux/string.h> /* memcpy, memmove, memset */ diff --git a/lib/zstd/zstd_common.c b/lib/zstd/zstd_common.c index 9a217e1573..6b2c79eeb6 100644 --- a/lib/zstd/zstd_common.c +++ b/lib/zstd/zstd_common.c @@ -9,6 +9,7 @@ ***************************************/ #include "error_private.h" #include "zstd_internal.h" /* declaration of ZSTD_isError, ZSTD_getErrorName, ZSTD_getErrorCode, ZSTD_getErrorString, ZSTD_versionNumber */ +#include <malloc.h> #include <linux/kernel.h> /*=************************************************************** |