diff --git a/pkg/semtech-loramac/contrib/semtech_loramac.c b/pkg/semtech-loramac/contrib/semtech_loramac.c index 97c6e5055c..0cd3a46b4f 100644 --- a/pkg/semtech-loramac/contrib/semtech_loramac.c +++ b/pkg/semtech-loramac/contrib/semtech_loramac.c @@ -609,7 +609,7 @@ void *_semtech_loramac_event_loop(void *arg) case MSG_TYPE_MAC_TIMEOUT: { DEBUG("[semtech-loramac] MAC timer timeout\n"); - void (*callback)(void) = msg.content.ptr; + void (*callback)(void) = (void (*)(void))(uintptr_t)msg.content.value; callback(); break; } diff --git a/pkg/semtech-loramac/contrib/semtech_loramac_timer.c b/pkg/semtech-loramac/contrib/semtech_loramac_timer.c index c77b24d5b4..d1ed507407 100644 --- a/pkg/semtech-loramac/contrib/semtech_loramac_timer.c +++ b/pkg/semtech-loramac/contrib/semtech_loramac_timer.c @@ -44,7 +44,7 @@ void TimerStart(TimerEvent_t *obj) xtimer_t *timer = &(obj->dev); msg_t *msg = &(obj->msg); msg->type = MSG_TYPE_MAC_TIMEOUT; - msg->content.ptr = obj->cb; + msg->content.value = (uintptr_t)obj->cb; xtimer_set_msg(timer, obj->timeout, msg, semtech_loramac_pid); }