proftpd syntax error

Beech Rintoul freebsd at alaskaparadise.com
Thu Dec 14 21:53:48 PST 2006


I'm in the process of updating this port. I'm getting this on a test build:

support.c: In function `sreplace':
support.c:862: error: syntax error at end of input
gmake[1]: *** [support.o] Error 1
gmake[1]: Leaving directory 
`/usr/ports/ftp/proftpd.test/work/proftpd-1.3.1rc1/src'
gmake: *** [src] Error 2
*** Error code 2

And here's the code in question:

const char *pr_strtime(time_t t) {
  static char buf[30];
  static char *mons[] = { "Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul",
    "Aug", "Sep", "Oct", "Nov", "Dec" };
  static char *days[] = { "Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat" };
  struct tm *tr;

  memset(buf, '\0', sizeof(buf));

  tr = localtime(&t);
  if (tr != NULL) {
    snprintf(buf, sizeof(buf), "%s %s %2d %02d:%02d:%02d %d",
      days[tr->tm_wday], mons[tr->tm_mon], tr->tm_mday, tr->tm_hour,
      tr->tm_min, tr->tm_sec, tr->tm_year + 1900);

  } else
    buf[0] = '\0';

  buf[sizeof(buf)-1] = '\0';

  return buf;
}

Can someone tell  me what's wrong?

Beech
-- 
---------------------------------------------------------------------------------------
Beech Rintoul - Sys. Administrator - beech at alaskaparadise.com
/"\   ASCII Ribbon Campaign  | Alaska Paradise Travel
\ / - NO HTML/RTF in e-mail  | 201 East 9Th Avenue Ste.310
 X  - NO Word docs in e-mail | Anchorage, AK 99501
/ \  - Please visit Alaska Paradise - http://www.alaskaparadise.com
---------------------------------------------------------------------------------------











-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 187 bytes
Desc: not available
Url : http://lists.freebsd.org/pipermail/freebsd-questions/attachments/20061215/5fb96969/attachment.pgp


More information about the freebsd-questions mailing list