[build] Prevent the use of reserved words in C23

GCC 15 defaults to C23, which reserves bool, true, and false as
keywords.  Avoid using these as parameter or variable names.

Modified-by: Michael Brown <mcb30@ipxe.org>
Signed-off-by: Michael Brown <mcb30@ipxe.org>
This commit is contained in:
Miao Wang
2025-04-27 17:30:49 +01:00
committed by Michael Brown
parent b816b816ab
commit 7741756afc
3 changed files with 10 additions and 13 deletions
@@ -32,7 +32,7 @@ mlx_status
mlx_pci_gw_check_capability_id(
IN mlx_utils *utils,
IN mlx_uint8 cap_pointer,
OUT mlx_boolean *bool
OUT mlx_boolean *result
)
{
mlx_status status = MLX_SUCCESS;
@@ -41,7 +41,7 @@ mlx_pci_gw_check_capability_id(
status = mlx_pci_read(utils, MlxPciWidthUint8, offset,
1, &id);
MLX_CHECK_STATUS(utils, status, read_err,"failed to read capability id");
*bool = ( id == PCI_GW_CAPABILITY_ID );
*result = ( id == PCI_GW_CAPABILITY_ID );
read_err:
return status;
}
+2 -5
View File
@@ -35,8 +35,9 @@ FILE_LICENCE ( GPL2_ONLY );
#ifndef _IGBVF_OSDEP_H_
#define _IGBVF_OSDEP_H_
#include <stdbool.h>
#define u8 unsigned char
#define bool boolean_t
#define dma_addr_t unsigned long
#define __le16 uint16_t
#define __le32 uint32_t
@@ -51,10 +52,6 @@ FILE_LICENCE ( GPL2_ONLY );
#define ETH_FCS_LEN 4
typedef int spinlock_t;
typedef enum {
false = 0,
true = 1
} boolean_t;
#define usec_delay(x) udelay(x)
#define msec_delay(x) mdelay(x)