summaryrefslogtreecommitdiff
path: root/devel/cgdb/patches/patch-aa
blob: 5946e830d71465edcd8a3ec494080ffc0148b126 (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
34
35
36
$NetBSD: patch-aa,v 1.2 2006/03/21 18:18:15 minskim Exp $

--- various/util/src/pseudo.c.orig	2003-04-27 17:04:04.000000000 -0700
+++ various/util/src/pseudo.c
@@ -88,6 +88,7 @@
 #define set_errno(errnum) (errno = (errnum), -1)
 
 
+#ifndef HAVE_STRLCPY
 /* strlcpy: Used instead of strcpy. Copies src into dst size bytes long.
  *
  * dst: destination
@@ -119,6 +120,7 @@ static size_t strlcpy(char *dst, const c
 
     return s - src - 1;
 }
+#endif
 
 static int groupname2gid(const char *groupname) {
 	FILE *group = fopen("/etc/group", "r");
@@ -327,6 +329,7 @@ int pty_open(int *masterfd, int *slavefd
 
 #ifndef HAVE_CYGWIN 
 #ifndef HAVE_LINUX /* linux does not use the streams module */
+#ifdef I_PUSH
 	/*
 	 * Push the appropriate streams modules, as described in Solaris pts(7).
 	 * HP-UX pts(7) doesn't have ttcompat module.
@@ -355,6 +358,7 @@ int pty_open(int *masterfd, int *slavefd
 #endif
 #endif
 #endif
+#endif
 
 #else /* HAVE_DEV_PTMX */
 #ifdef HAVE_DEV_PTS_AND_PTC