Credits go to @rici as he answered ages ago but in order to move this to closure, the following code resolves the issue:
#include <malloc.h>
#include <time.h>
#include <signal.h>
int main() {
timer_t * timer = (timer_t*)malloc(sizeof(timer_t));
siginfo_t si = {0};
timer_t *tidptr;
tidptr = (timer_t*)si.si_value.sival_ptr;
return 0;
}
bash-3.2$ ntoarmv7-g++ tst.c -Wall
tst.c: In function 'int main()':
tst.c:7: warning: unused variable 'timer'
bash-3.2$
The issue is as explained by both the compiler and rici above: c++ does not permit assigning pointers of incompatible type. The original code would build happily with gcc (instead of g++).