[external][libfdt] rename a top level function that collides with the name of a structure

Fixes an issue when the header is compiled with C++.
This commit is contained in:
Travis Geiselbrecht
2024-04-14 15:48:28 -07:00
parent 414c1e2665
commit 0255d80bd0
2 changed files with 6 additions and 5 deletions

View File

@@ -322,7 +322,7 @@ int fdt_property_placeholder(void *fdt, const char *name, int len, void **valp)
return 0;
}
int fdt_property(void *fdt, const char *name, const void *val, int len)
int fdt_property_(void *fdt, const char *name, const void *val, int len)
{
void *ptr;
int ret;

View File

@@ -1537,16 +1537,17 @@ int fdt_resize(void *fdt, void *buf, int bufsize);
int fdt_add_reservemap_entry(void *fdt, uint64_t addr, uint64_t size);
int fdt_finish_reservemap(void *fdt);
int fdt_begin_node(void *fdt, const char *name);
int fdt_property(void *fdt, const char *name, const void *val, int len);
// LK: modified fdt_property function name to not collide with struct fdt_property in C++
int fdt_property_(void *fdt, const char *name, const void *val, int len);
static inline int fdt_property_u32(void *fdt, const char *name, uint32_t val)
{
fdt32_t tmp = cpu_to_fdt32(val);
return fdt_property(fdt, name, &tmp, sizeof(tmp));
return fdt_property_(fdt, name, &tmp, sizeof(tmp));
}
static inline int fdt_property_u64(void *fdt, const char *name, uint64_t val)
{
fdt64_t tmp = cpu_to_fdt64(val);
return fdt_property(fdt, name, &tmp, sizeof(tmp));
return fdt_property_(fdt, name, &tmp, sizeof(tmp));
}
#ifndef SWIG /* Not available in Python */
@@ -1572,7 +1573,7 @@ static inline int fdt_property_cell(void *fdt, const char *name, uint32_t val)
int fdt_property_placeholder(void *fdt, const char *name, int len, void **valp);
#define fdt_property_string(fdt, name, str) \
fdt_property(fdt, name, str, strlen(str)+1)
fdt_property_(fdt, name, str, strlen(str)+1)
int fdt_end_node(void *fdt);
int fdt_finish(void *fdt);