From c2948b9248016388f9b7c5595b0e1aba7e1ace8d Mon Sep 17 00:00:00 2001 From: Andrew Bartlett Date: Tue, 13 May 2003 06:13:36 +0000 Subject: [PATCH] Fix non-constant initialiser for Sun CC. --- source/client/client.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/source/client/client.c b/source/client/client.c index b498b5b4a88..690cc99f7fe 100644 --- a/source/client/client.c +++ b/source/client/client.c @@ -2261,8 +2261,14 @@ static char **remote_completion(const char *text, int len) { pstring dirmask; int i; - completion_remote_t info = { "", NULL, 1, len, text, len }; + completion_remote_t info = { "", NULL, 1, 0, NULL, 0 }; + /* can't have non-static intialisation on Sun CC, so do it + at run time here */ + info.samelen = len; + info.text = text; + info.len = len; + if (len >= PATH_MAX) return(NULL);