SecBSD's official ports repository
This commit is contained in:
commit
2c0afcbbf3
64331 changed files with 5339189 additions and 0 deletions
51
x11/x11vnc/patches/patch-src_unixpw_c
Normal file
51
x11/x11vnc/patches/patch-src_unixpw_c
Normal file
|
@ -0,0 +1,51 @@
|
|||
Index: src/unixpw.c
|
||||
--- src/unixpw.c.orig
|
||||
+++ src/unixpw.c
|
||||
@@ -85,13 +85,6 @@ extern char *crypt(const char*, const char *);
|
||||
#include <sys/stropts.h>
|
||||
#endif
|
||||
|
||||
-#if defined(__OpenBSD__) || defined(__FreeBSD__) || defined(__NetBSD__)
|
||||
-#define IS_BSD
|
||||
-#endif
|
||||
-#if (defined(__MACH__) && defined(__APPLE__))
|
||||
-#define IS_BSD
|
||||
-#endif
|
||||
-
|
||||
int white_pixel(void);
|
||||
void unixpw_screen(int init);
|
||||
void unixpw_keystroke(rfbBool down, rfbKeySym keysym, int init);
|
||||
@@ -522,6 +515,9 @@ char *get_pty_ptmx(int *fd_p) {
|
||||
|
||||
#if HAVE_GRANTPT
|
||||
|
||||
+#if LIBVNCSERVER_HAVE_POSIX_OPENPT
|
||||
+ fd = posix_openpt(O_RDWR|O_NOCTTY);
|
||||
+#else
|
||||
for (i=0; i < ndevs; i++) {
|
||||
#ifdef O_NOCTTY
|
||||
fd = open(devs[i], O_RDWR|O_NOCTTY);
|
||||
@@ -532,6 +528,7 @@ char *get_pty_ptmx(int *fd_p) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
+#endif
|
||||
|
||||
if (fd < 0) {
|
||||
rfbLogPerror("open /dev/ptmx");
|
||||
@@ -625,15 +622,11 @@ char *get_pty(int *fd_p) {
|
||||
if (getenv("BSD_PTY")) {
|
||||
return get_pty_loop(fd_p);
|
||||
}
|
||||
-#ifdef IS_BSD
|
||||
- return get_pty_loop(fd_p);
|
||||
-#else
|
||||
#if HAVE_GRANTPT
|
||||
used_get_pty_ptmx = 1;
|
||||
return get_pty_ptmx(fd_p);
|
||||
#else
|
||||
return get_pty_loop(fd_p);
|
||||
-#endif
|
||||
#endif
|
||||
}
|
||||
|
Loading…
Add table
Add a link
Reference in a new issue