• Skip to sidebar navigation
  • Skip to content

Bitbucket

  • More
    ProjectsRepositories
  • Help
    • Online help
    • Learn Git
    • Welcome to Bitbucket
    • Keyboard shortcuts
  • Log In
Alexander Dahl
  1. Alexander Dahl

buildroot

Public
Actions
  • Clone
  • Compare

Learn more about cloning repositories

You have read-only access

Navigation
  • Source
  • Commits
  • Branches
  • All Branches Graph
  • Forks
  1. Alexander Dahl
  2. buildroot

Source

buildroot/package/kvmtool/0005-Fix-call-to-connect.patch
Thomas PetazzoniThomas Petazzoni committed 3785e822de919 Aug 2017
Raw file
Source viewDiff to previous
xxxxxxxxxx
 
1
From d375235f49184371026791ae8f6f9dc307de8a61 Mon Sep 17 00:00:00 2001
2
From: Andre Przywara <andre.przywara@arm.com>
3
Date: Fri, 17 Jul 2015 17:02:14 +0100
4
Subject: [PATCH] Fix call to connect()
5
​
6
According to the manpage and the prototype the second argument to
7
connect(2) is a "const struct sockaddr*", so cast our protocol
8
specific type back to the super type.
9
This fixes compilation on musl-libc.
10
​
11
Signed-off-by: Andre Przywara <andre.przywara@arm.com>
12
Signed-off-by: Will Deacon <will.deacon@arm.com>
13
[backport from upstream commit d77bd4f466f341d4b35fe8b91176ef8a37160e19.]
14
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
15
---
16
 kvm-ipc.c | 2 +-
17
 1 file changed, 1 insertion(+), 1 deletion(-)
18
​
19
diff --git a/kvm-ipc.c b/kvm-ipc.c
20
index b1c43dd..5a0b6e0 100644
21
--- a/kvm-ipc.c
22
+++ b/kvm-ipc.c
23
@@ -99,7 +99,7 @@ int kvm__get_sock_by_instance(const char *name)
24
    strlcpy(local.sun_path, sock_file, sizeof(local.sun_path));
25
    len = strlen(local.sun_path) + sizeof(local.sun_family);
26
 
27
-   r = connect(s, &local, len);
28
+   r = connect(s, (struct sockaddr *)&local, len);
29
    if (r < 0 && errno == ECONNREFUSED) {
30
        /* Tell the user clean ghost socket file */
31
        pr_err("\"%s\" could be a ghost socket file, please remove it",
32
-- 
33
2.9.4
34
​
  • Git repository management for enterprise teams powered by Atlassian Bitbucket
  • Atlassian Bitbucket v6.7.2
  • Documentation
  • Request a feature
  • About
  • Contact Atlassian
Atlassian

Everything looks good. We'll let you know here if there's anything you should know about.