Skip to content

Conversation

@qti-sbojja
Copy link

Add _GNU_SOURCE macro to enable GNU-specific APIs like pthread_setname_np and dlinfo.
Correct type mismatch by casting to timer_t* instead of posal_timer_info_t*.

These changes address build errors and warnings encountered during compilation with GCC 14.2, ensuring compatibility and cleaner builds across platforms.

Add _GNU_SOURCE macro to enable GNU-specific APIs like
pthread_setname_np and dlinfo.
Correct type mismatch by casting to timer_t* instead of
posal_timer_info_t*.

These changes address build errors and warnings encountered during
compilation with GCC 14.2, ensuring compatibility and cleaner builds
across platforms.

Signed-off-by: Sairamreddy Bojja <sbojja@qti.qualcomm.com>
*/

log_pkt_ptr = log_alloc(log_code, log_pkt_size);
log_pkt_ptr = (void *)(uintptr_t) log_alloc(log_code, log_pkt_size);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why do we need (uintptr_t)? By the way, where can I find definition of log_alloc() ?

/* ----------------------------------------------------------------------------
* Include Files
* ------------------------------------------------------------------------- */
#define _GNU_SOURCE
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What are functions missing without _GNU_SOURCE?
Can we try to define in CMakefile only if compiler is gcc? https://stackoverflow.com/questions/10046114/in-cmake-how-can-i-test-if-the-compiler-is-clang

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants