aboutsummaryrefslogtreecommitdiffstats
path: root/net/tigervnc-devel/files/patch-unix_vncserver
blob: f7eed0e6c7e2356868f836221cc080fc8a68ede9 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
--- unix/vncserver.orig 2017-04-19 13:27:31 UTC
+++ unix/vncserver
@@ -532,7 +532,7 @@ sub CheckDisplayNumber
 
     socket(S, $AF_INET, $SOCK_STREAM, 0) || die "$prog: socket failed: $!\n";
     eval 'setsockopt(S, &SOL_SOCKET, &SO_REUSEADDR, pack("l", 1))';
-    if (!bind(S, pack('S n x12', $AF_INET, 6000 + $n))) {
+    if (!bind(S, sockaddr_in(6000 + $n, &INADDR_ANY))) {
    close(S);
    return 0;
     }
@@ -540,7 +540,7 @@ sub CheckDisplayNumber
 
     socket(S, $AF_INET, $SOCK_STREAM, 0) || die "$prog: socket failed: $!\n";
     eval 'setsockopt(S, &SOL_SOCKET, &SO_REUSEADDR, pack("l", 1))';
-    if (!bind(S, pack('S n x12', $AF_INET, 5900 + $n))) {
+    if (!bind(S, sockaddr_in(5900 + $n, &INADDR_ANY))) {
    close(S);
    return 0;
     }