diff options
author | Pav Lucistnik <pav@FreeBSD.org> | 2005-07-14 16:03:24 +0000 |
---|---|---|
committer | Pav Lucistnik <pav@FreeBSD.org> | 2005-07-14 16:03:24 +0000 |
commit | 24b298f317b8e4081ac991e2d4e20ae1a7efc57c (patch) | |
tree | 8900da36661b9476ce77b48a6553cc70f143e6ef /comms/scmxx/files/patch-src_pinfile.c | |
parent | update to 2.0.0 beta 6 (diff) |
- Update to 0.8.0
PR: ports/83463
Submitted by: Janos Mohacsi <janos.mohacsi@bsd.hu> (maintainer)
Notes
Notes:
svn path=/head/; revision=139224
Diffstat (limited to 'comms/scmxx/files/patch-src_pinfile.c')
-rw-r--r-- | comms/scmxx/files/patch-src_pinfile.c | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/comms/scmxx/files/patch-src_pinfile.c b/comms/scmxx/files/patch-src_pinfile.c new file mode 100644 index 000000000000..6a48a2dfbe97 --- /dev/null +++ b/comms/scmxx/files/patch-src_pinfile.c @@ -0,0 +1,23 @@ + +$FreeBSD$ + +--- src/pinfile.c.orig ++++ src/pinfile.c +@@ -21,6 +21,17 @@ + #include <limits.h> + #include <ctype.h> + ++char* strndup(const char *str, size_t len) { ++ size_t copy_len=(strlen (str) > len) ? strlen(str): len; ++ char *new = (char *) malloc (copy_len + 1); ++ ++ if (new == NULL) ++ return NULL; ++ ++ new[copy_len] = '\0'; ++ return (char *) memcpy (new, str, copy_len); ++} ++ + char* pinfile_get_data (char* filename) { + int fd = open(filename,O_RDONLY); + struct stat fdstat; |