summaryrefslogtreecommitdiff
path: root/net/rp-l2tp/patches/patch-ac
blob: a389b72056a126e43b64e9f77c9597c84eaf1e02 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
$NetBSD: patch-ac,v 1.1.1.1 2003/12/18 16:39:18 agc Exp $

--- handlers/pty.c	2003/12/18 09:47:10	1.1
+++ handlers/pty.c	2003/12/18 09:49:36
@@ -21,7 +21,10 @@
 #include <termios.h>
 #include <fcntl.h>
 #include <stdio.h>
-#ifndef N_HDLC
+#ifdef __NetBSD__
+#include <util.h>
+#endif
+#if defined(__linux__) && !defined(N_HDLC)
 #include <linux/termios.h>
 #endif
 
@@ -39,6 +42,9 @@
 int
 pty_get(int *mfp, int *sfp)
 {
+#ifdef __NetBSD__
+	return openpty(mfp, sfp, NULL, NULL, NULL);
+#else
     char pty_name[24];
     struct termios tios;
     int mfd, sfd;
@@ -92,5 +98,6 @@
 	return -1;
     }
     return 0;
+#endif
 }