1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2024-12-29 04:50:03 +01:00
RIOT/pkg/ccn-lite/patches/0005-src-ccn-core-declare-gettimeofday-function-as-weak-s.patch
Gunar Schorcht 4bcaab1eb7 pkg/ccn-lite: declare gettimeofday function as weak symbol
The definition of gettimeofday in pkg/ccn-lite leads to multiple definitions on platforms where gettimeofday is compiled in in newlib. Therefore, the gettimeofday function in pkg/ccn-lite is declared as weak symbol.
2022-08-24 09:05:25 +02:00

27 lines
937 B
Diff

From a55827ad8d6563212670c53994b9beb8e1033938 Mon Sep 17 00:00:00 2001
From: Gunar Schorcht <gunar@schorcht.net>
Date: Tue, 23 Aug 2022 17:03:13 +0200
Subject: [PATCH 5/5] src/ccn-core: declare gettimeofday function as weak
symbol
The definition of gettimeofday in this file leads to multiple definitions on platforms where gettimeofday is compiled in in newlib. Therefore, the gettimeofday function in this file is declared as weak symbol.
---
src/ccnl-core/src/ccnl-os-time.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/src/ccnl-core/src/ccnl-os-time.c b/src/ccnl-core/src/ccnl-os-time.c
index 0087b9dc156..bd05cd8df97 100644
--- a/src/ccnl-core/src/ccnl-os-time.c
+++ b/src/ccnl-core/src/ccnl-os-time.c
@@ -42,6 +42,7 @@ struct ccnl_timer_s *eventqueue;
#include <timex.h>
#include <div.h>
+__attribute__((weak))
int gettimeofday(struct timeval *__restrict __p, void *__restrict __tz)
{
(void) __tz;
--
2.17.1