From 5d272161edca4b831e110382dfa17174cfc5907d Mon Sep 17 00:00:00 2001 From: Charles Kerr Date: Wed, 5 May 2010 16:03:33 +0000 Subject: [PATCH] (trunk libT) fix bencode.c cross-compile error on arm-based NAS reported by nahkiss. This bug was introduced in a patch to fix #3172 and was added to trunk with r10549 and 1.9x/ with r10549 --- libtransmission/bencode.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libtransmission/bencode.c b/libtransmission/bencode.c index 7c922e95c..78dedcd50 100644 --- a/libtransmission/bencode.c +++ b/libtransmission/bencode.c @@ -13,7 +13,6 @@ #include #include /* isdigit() */ #include -#include /* PATH_MAX */ #include /* fabs() */ #include #include /* realpath() */ @@ -32,6 +31,7 @@ #include "bencode.h" #include "json.h" #include "list.h" +#include "platform.h" /* MAX_PATH_LEN */ #include "ptrarray.h" #include "utils.h" /* tr_new(), tr_free() */ @@ -1621,7 +1621,7 @@ tr_bencToFile( const tr_benc * top, tr_fmt_mode mode, const char * filename ) char * tmp; int fd; int err = 0; - char buf[PATH_MAX]; + char buf[MAX_PATH_LENGTH]; /* follow symlinks to find the "real" file, to make sure the temporary * we build with mkstemp() is created on the right partition */