]> git.ipfire.org Git - thirdparty/dhcpcd.git/commitdiff
logerr: Preserve errno
authorRoy Marples <roy@marples.name>
Sat, 30 May 2020 13:54:31 +0000 (14:54 +0100)
committerRoy Marples <roy@marples.name>
Sat, 30 May 2020 13:54:31 +0000 (14:54 +0100)
src/logerr.c

index 877be37972f8b5bbbd077dd087da29ec1e7caf25..c4d0462a0c8052b34637a2741d97349bddf72d9e 100644 (file)
@@ -237,6 +237,7 @@ vlogerrmessage(int pri, const char *fmt, va_list args)
 
        vsnprintf(buf, sizeof(buf), fmt, args);
        logmessage(pri, "%s: %s", buf, strerror(_errno));
+       errno = _errno;
 }
 
 __printflike(2, 3) void