2016-02-19 11:14:48 +01:00
|
|
|
$NetBSD: patch-unix_vncserver,v 1.2 2016/02/19 10:14:48 wiz Exp $
|
2015-02-08 20:42:09 +01:00
|
|
|
|
2016-02-19 11:14:48 +01:00
|
|
|
--- unix/vncserver.orig 2015-12-24 20:18:02.000000000 +0000
|
2015-02-08 20:42:09 +01:00
|
|
|
+++ unix/vncserver
|
2016-02-19 11:14:48 +01:00
|
|
|
@@ -101,6 +101,8 @@ if (-d "/etc/X11/fontpath.d") {
|
2015-02-08 20:42:09 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
@fontpaths = ('/usr/share/X11/fonts', '/usr/share/fonts', '/usr/share/fonts/X11/');
|
|
|
|
+if (! -l "@PREFIX@/share/fonts/X11") {push(@fontpaths, '@PREFIX@/share/fonts/X11');}
|
|
|
|
+if (! -l "@X11BASE@/lib/X11/fonts") {push(@fontpaths, '@X11BASE@/lib/X11/fonts');}
|
|
|
|
if (! -l "/usr/lib/X11") {push(@fontpaths, '/usr/lib/X11/fonts');}
|
|
|
|
if (! -l "/usr/X11") {push(@fontpaths, '/usr/X11/lib/X11/fonts');}
|
|
|
|
if (! -l "/usr/X11R6") {push(@fontpaths, '/usr/X11R6/lib/X11/fonts');}
|
2016-02-19 11:14:48 +01:00
|
|
|
@@ -485,7 +487,7 @@ sub CheckDisplayNumber
|
2015-02-08 20:42:09 +01:00
|
|
|
|
|
|
|
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;
|
|
|
|
}
|
2016-02-19 11:14:48 +01:00
|
|
|
@@ -493,7 +495,7 @@ sub CheckDisplayNumber
|
2015-02-08 20:42:09 +01:00
|
|
|
|
|
|
|
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;
|
|
|
|
}
|