From 13bf409f0636e9b3a617f5636390c38f4f7d4879 Mon Sep 17 00:00:00 2001 From: Sergei Shirokov Date: Mon, 6 May 2024 11:15:19 +0300 Subject: [PATCH] fix build under clang --- .gitignore | 4 ++++ socketcan/libcanard/src/socketcan.c | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index 5afcdc4..68c2ff4 100644 --- a/.gitignore +++ b/.gitignore @@ -41,3 +41,7 @@ build/ cmake-build-*/ __pycache__/ dsdlc_generated/ + +# OS stuff +.DS_Store +*.bak diff --git a/socketcan/libcanard/src/socketcan.c b/socketcan/libcanard/src/socketcan.c index 3ff2a12..fd369ca 100644 --- a/socketcan/libcanard/src/socketcan.c +++ b/socketcan/libcanard/src/socketcan.c @@ -30,7 +30,7 @@ #define KILO 1000L #define MEGA (KILO * KILO) -static int16_t getNegatedErrno() +static int16_t getNegatedErrno(void) { const int out = -abs(errno); if (out < 0)