FreeBSDs "make world" breaks with "makedevs.c:4: error: syntax error before ',' token"

From ZS64
Jump to navigationJump to search

When compiling sysinstall during a "make world" procedure, the process stops with:

makedevs.c:4: error: syntax error before ',' token
makedevs.c:7: error: syntax error before ',' token

Go to /usr/src/usr.sbin/sysinstall/ and apply

 --- patch-rtermcap.c begins here ---
 --- rtermcap_orig.c	Sun May  7 15:07:53 1995
 +++ rtermcap.c	Wed Dec 17 18:31:21 2003
 @@ -1,15 +1,23 @@
 -#include <stdio.h>
 -#include <termcap.h>
 +#include <stdlib.h>
  
  int
  main(int argc, char **argv)
  {
 -	char	buf[4096];
 +	char * files[]={ "/etc/termcap" };
 +	char * tbuf;
 +	char * buf;
 +	char * c;
 +	char d;
  	int	i;
 -
	if (argc < 2)
  		return 1;
 -	i = tgetent(buf, argv[1]);
 -	printf("%s",buf);
 +	i=cgetent(&tbuf, files, argv[1]);
 +	for (c = tbuf; *c != 0; c++) {
 +		if(*c != '\t' && (*c != 58 || d != 58)) { 
 +			printf("%c", *c);
 +			d = *c;
 +		}
 +	}
 +	cgetclose();
  	return 0;
  }
 --- patch-rtermcap.c ends here ---