If you want to copy data, you must allocate a new memory through malloc, and then copy your memory through memcpy.
void *startgpswatchdog(void *ptr)
{
GPSLocation *destination = malloc(sizeof(GPSLocation));
memcpy(destination, ptr, sizeof(GPSLocation));
}
source
share