diff --git a/cfg/posix.cfg b/cfg/posix.cfg
index fd393d405..a4eedcefe 100644
--- a/cfg/posix.cfg
+++ b/cfg/posix.cfg
@@ -4646,6 +4646,23 @@ The function 'mktemp' is considered to be dangerous due to race conditions and s
Non reentrant function 'getlogin' called. For threadsafe applications it is recommended to use the reentrant replacement function 'getlogin_r'.
+
+
+
+
+
+ false
+
+
+
+
+
+
+
+
+ 0:
+
+
diff --git a/test/cfg/posix.c b/test/cfg/posix.c
index 36daa93e4..80153087c 100644
--- a/test/cfg/posix.c
+++ b/test/cfg/posix.c
@@ -31,6 +31,13 @@
#include
#include
+int nullPointer_getlogin_r(char *buf, size_t bufsize)
+{
+ // cppcheck-suppress nullPointer
+ (void)getlogin_r(NULL,bufsize);
+ return getlogin_r(buf,bufsize);
+}
+
ssize_t uninitvar_pread(int fd, void *buf, size_t nbyte, off_t offset)
{
int Fd;