Commit 4055f1c3 authored by Markus Koschany's avatar Markus Koschany

Drop FTBFS_non-linux.patch. Merged upstream.

parent 50ace6ea
......@@ -7,6 +7,7 @@ tofrodos (1.7.13+ds-1) unstable; urgency=low
[ Markus Koschany ]
* New Maintainer. (Closes: #726553)
* New upstream release. (Closes: #692421)
- Drop FTBFS_non-linux.patch. Merged upstream.
* Switch to source format 3.0.
* Bump compat level to 9 and require debhelper >= 9.
* Bump Standards-Version to 3.9.4, no changes.
......
From: Guillem Jover <guillem@debian.org>
Date: Thu, 18 Oct 2011 19:06:01 +0200
Subject: FTBFS_non-linux
---
src/config.h | 4 +++-
src/tofrodos.c | 13 ++++++++++---
2 files changed, 13 insertions(+), 4 deletions(-)
diff --git a/src/config.h b/src/config.h
index ff6adc1..91a7480 100644
--- a/src/config.h
+++ b/src/config.h
@@ -96,7 +96,9 @@ extern "C" {
#endif
#endif
-#if defined(__FreeBSD__) || defined(__OpenBSD__) /* seems to work like Linux... */
+#if defined(__FreeBSD__) || defined(__FreeBSD_kernel__) || \
+ defined(__OpenBSD__) || defined(__NetBSD__) || \
+ defined(__GNU__) /* seems to work like Linux... */
#if !defined(LINUX)
#define LINUX
#endif
diff --git a/src/tofrodos.c b/src/tofrodos.c
index e9b8e9c..a9c5dc3 100644
--- a/src/tofrodos.c
+++ b/src/tofrodos.c
@@ -418,7 +418,7 @@ static int convert ( FILE * infp, FILE * outfp )
static int openandconvert_preamble ( char * filename )
{
struct stat statbuf ;
- char realfilepath[MAXPATHLEN+1] ;
+ char *realfilepath ;
int len ;
/* get the file information */
@@ -436,16 +436,23 @@ static int openandconvert_preamble ( char * filename )
/* eg, #define S_ISLNK(x) (((x) & S_IFMT) == S_IFLNK) */
/* or something like that. */
- if ((len = readlink( filename, realfilepath, (sizeof(realfilepath) - 1) )) != -1) {
+ realfilepath = xmalloc( statbuf.st_size + 1 );
+
+ if ((len = readlink( filename, realfilepath, statbuf.st_size )) != -1) {
+ int ret ;
+
/* got to null terminate the string - there is always space because */
/* we passed readlink() the size of the buffer less 1. */
realfilepath[len] = '\0' ;
if (verbose) {
emsg( VERBOSE_SYMLINKSRC, filename, realfilepath );
}
- return openandconvert( realfilepath );
+ ret = openandconvert( realfilepath );
+ free( realfilepath );
+ return ret;
}
emsg( EMSG_SYMLINK, filename );
+ free( realfilepath );
return -1 ;
}
/* If we reach here, "filename" is not a symbolic link */
FTBFS_non-linux.patch
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment