mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-04-14 10:07:39 +08:00
Fix some dynamic linking errors.
_Stof, bsearch, param_find_changed
This commit is contained in:
parent
606bff2634
commit
859b242cb8
@ -10,6 +10,7 @@ if (DEFINED ENV{QC_SOC_TARGET})
|
||||
else()
|
||||
set(QC_SOC_TARGET "APQ8074")
|
||||
endif()
|
||||
add_definitions(-D__PX4_QURT_EAGLE_${QC_SOC_TARGET})
|
||||
|
||||
include(px4_git)
|
||||
px4_add_git_submodule(TARGET git_cmake_hexagon PATH "${PX4_SOURCE_DIR}/boards/atlflight/cmake_hexagon")
|
||||
|
||||
@ -118,3 +118,42 @@ void __cxa_pure_virtual()
|
||||
PX4_WARN("Error: Calling unresolved symbol stub[%s]", __FUNCTION__);
|
||||
block_indefinite();
|
||||
}
|
||||
|
||||
#ifdef __PX4_QURT_EAGLE_APQ8074
|
||||
|
||||
float _Stof(const char *p0, char **p1, long p2)
|
||||
{
|
||||
PX4_WARN("Error: Calling unresolved symbol stub[%s]", __FUNCTION__);
|
||||
block_indefinite();
|
||||
return 0;
|
||||
}
|
||||
|
||||
void *bsearch(const void *key, const void *ptr, size_t count, size_t size, int (*comp)(const void *, const void *))
|
||||
{
|
||||
const char *first = (const char *)ptr;
|
||||
|
||||
while (count > 1) {
|
||||
size_t m = count / 2;
|
||||
const char *middle_element = first + m * size;
|
||||
int cmp_res = comp(middle_element, key);
|
||||
|
||||
if (cmp_res > 0) {
|
||||
count = m;
|
||||
|
||||
} else if (cmp_res == 0) {
|
||||
return (void *)middle_element;
|
||||
|
||||
} else {
|
||||
first = middle_element + size;
|
||||
count = count - m - 1;
|
||||
}
|
||||
}
|
||||
|
||||
if (count && comp(first, key) == 0) {
|
||||
return (void *)first;
|
||||
}
|
||||
|
||||
return NULL;
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
@ -325,7 +325,7 @@ param_compare_values(const void *a, const void *b)
|
||||
* @return The structure holding the modified value, or
|
||||
* nullptr if the parameter has not been modified.
|
||||
*/
|
||||
static param_wbuf_s *
|
||||
param_wbuf_s *
|
||||
param_find_changed(param_t param)
|
||||
{
|
||||
param_wbuf_s *s = nullptr;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user