commonlib/bsd, libpayload: Do not include helpers.h in stddef.h

`stddef.h` should only provide the definitions defined by ISO or Posix.
The included `commonlib/bsd/helpers.h` provide a lot of non standard
definitions that may interfere with definitions from the application.

Change-Id: Ia71edbc3ffe6694ff4b971decf3a41f915264bc8
Signed-off-by: Thomas Heijligen <src@posteo.de>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/70116
Reviewed-by: Elyes Haouas <ehaouas@noos.fr>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
This commit is contained in:
Thomas Heijligen 2022-11-28 11:46:48 +01:00 committed by Felix Held
parent 3d91563c98
commit 3f9613bf6d
4 changed files with 7 additions and 6 deletions

View File

@ -1,11 +1,7 @@
/* SPDX-License-Identifier: BSD-3-Clause */
#include <arch/virtual.h>
#include <libpayload.h>
#include <boot_device.h>
#include <commonlib/bsd/cb_err.h>
#include <stddef.h>
#include <string.h>
#include <sysinfo.h>
__attribute__((weak)) ssize_t boot_device_read(void *buf, size_t offset, size_t size)
{

View File

@ -2,7 +2,10 @@
#define _STDDEF_H
#include <arch/types.h>
#include <commonlib/bsd/helpers.h>
#if !defined(offsetof)
#define offsetof(type, member) __builtin_offsetof(type, member)
#endif
#ifndef __WCHAR_TYPE__
#define __WCHAR_TYPE__ int

View File

@ -2,6 +2,7 @@
#include <assert.h>
#include <commonlib/bsd/cbfs_private.h>
#include <commonlib/bsd/helpers.h>
/*
* A CBFS metadata cache is an in memory data structure storing CBFS file headers (= metadata).

View File

@ -1,6 +1,7 @@
/* SPDX-License-Identifier: BSD-3-Clause OR GPL-2.0-or-later */
#include <commonlib/bsd/cbfs_private.h>
#include <commonlib/bsd/helpers.h>
#include <assert.h>
static enum cb_err read_next_header(cbfs_dev_t dev, size_t *offset, struct cbfs_file *buffer,