aboutsummaryrefslogtreecommitdiffstats
path: root/net/tigervnc-devel/files/patch-unix_vncserver
blob: 045d688cd85e22c5cdcb9e6a19ce651f4b0dfd83 (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 2012-05-27 21:16:41.000000000 +0900
+++ unix/vncserver  2012-05-27 21:17:13.000000000 +0900
@@ -422,7 +422,7 @@
 
     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;
     }
@@ -430,7 +430,7 @@
 
     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;
     }