Fix some dynamic linking errors.

_Stof, bsearch, param_find_changed
This commit is contained in:
Kārlis Seņko
2018-12-06 15:27:46 +02:00
committed by Daniel Agar
parent 606bff2634
commit 859b242cb8
3 changed files with 41 additions and 1 deletions

View File

@@ -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