]> git.ipfire.org Git - thirdparty/dhcpcd.git/commitdiff
Fix compile
authorRoy Marples <roy@marples.name>
Wed, 15 Jul 2026 13:56:32 +0000 (14:56 +0100)
committerRoy Marples <roy@marples.name>
Wed, 15 Jul 2026 13:56:32 +0000 (14:56 +0100)
compat/getpeereid.c
configure

index 8f38b7b253538374ae5690bac5b6d58336fc13e7..dc2bfa02312375248207ab6ae98163d0aaa91871 100644 (file)
@@ -37,11 +37,7 @@ int
 getpeereid(int fd, uid_t *uid, gid_t *gid)
 {
 #if defined(SO_PEERCRED)
-#if defined(__OpenBSD__)
-       struct sockpeercred creds;
-#else
        struct ucred creds;
-#endif
        socklen_t creds_len = sizeof(creds);
 
        if (getsockopt(fd, SOL_SOCKET, SO_PEERCRED, &creds, &creds_len) == -1)
index 3c56eda79326b26b46e4f258ae854e1288d4c631..32bf96ef9b39651fd5eeaa824b624b30776ccd44 100755 (executable)
--- a/configure
+++ b/configure
@@ -943,6 +943,7 @@ if [ -z "$GETPEEREID" ]; then
        cat <<EOF >_getpeereid.c
 #include <sys/types.h>
 #include <sys/socket.h>
+#include <unistd.h>
 int main(void) {
        return getpeereid(0, NULL, NULL);
 }