From 3b1463ae0732a1c264e2f79592aed9e5856f8dc1 Mon Sep 17 00:00:00 2001 From: Neil McKee Date: Thu, 31 Aug 2023 14:58:18 -0700 Subject: [PATCH] improve portability --- src/Linux/readHidCounters.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Linux/readHidCounters.c b/src/Linux/readHidCounters.c index 8e18f38..fa9362a 100644 --- a/src/Linux/readHidCounters.c +++ b/src/Linux/readHidCounters.c @@ -22,7 +22,7 @@ extern "C" { return NO; } - int nlen = my_strnlen(uu.nodename, _UTSNAME_NODENAME_LENGTH); + int nlen = my_strnlen(uu.nodename, sizeof(uu.nodename)); if(nlen > hbufLen) nlen = hbufLen; memcpy(hbuf, uu.nodename, nlen); @@ -78,7 +78,7 @@ extern "C" { hid->os_name = SFLOS_linux; // os release - int rlen = my_strnlen(uu.release, _UTSNAME_RELEASE_LENGTH); + int rlen = my_strnlen(uu.release, sizeof(uu.release)); if(rlen > rbufLen) rlen = rbufLen; memcpy(rbuf, uu.release, rlen);