aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTravis Geiselbrecht <geist@foobox.com>2024-04-14 15:48:28 -0700
committerTravis Geiselbrecht <geist@foobox.com>2024-04-16 23:01:31 -0700
commit0255d80bd0271735c49e5564d36c7daa7ee8fbc0 (patch)
tree9effde977d3daf76154a69d4ba315cd7f0c82613
parent414c1e26654de043590f783bc7237a21b2e08956 (diff)
downloadlk-0255d80bd0271735c49e5564d36c7daa7ee8fbc0.tar.gz
[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++.
-rw-r--r--external/lib/fdt/fdt_sw.c2
-rw-r--r--external/lib/fdt/include/libfdt.h9
2 files changed, 6 insertions, 5 deletions
diff --git a/external/lib/fdt/fdt_sw.c b/external/lib/fdt/fdt_sw.c
index 4c569ee7..2714010c 100644
--- a/external/lib/fdt/fdt_sw.c
+++ b/external/lib/fdt/fdt_sw.c
@@ -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;
diff --git a/external/lib/fdt/include/libfdt.h b/external/lib/fdt/include/libfdt.h
index 0677feaa..d77903c8 100644
--- a/external/lib/fdt/include/libfdt.h
+++ b/external/lib/fdt/include/libfdt.h
@@ -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);