Bug 25651 - Syntax error in tcp_usrreq.c (COMMON_START macros)
Summary: Syntax error in tcp_usrreq.c (COMMON_START macros)
Status: Closed FIXED
Alias: None
Product: Base System
Classification: Unclassified
Component: kern (show other bugs)
Version: 4.2-STABLE
Hardware: Any Any
: Normal Affects Only Me
Assignee: freebsd-bugs (Nobody)
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2001-03-10 14:30 UTC by alexs
Modified: 2001-03-13 14:47 UTC (History)
0 users

See Also:


Attachments
file.diff (1.49 KB, patch)
2001-03-10 14:30 UTC, alexs
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description alexs 2001-03-10 14:30:01 UTC
	Sources has been updated via cvsup at 1pm March 10, 2001. Then

	make buildworld
	make installworld

	was completed successfully. And after this attempt to do

	make KERNCONF=SNARK kernel
	
	leads to the following diagnostics:

cc -c -O -pipe -Wall -Wredundant-decls -Wnested-externs -Wstrict-prototypes  -Wmissing-prototypes -Wpointer-arith -Winline -Wcast-qual  -fformat-extensions -ansi  -nostdinc -I- -I. -I../.. -I../../../include  -D_KERNEL -include opt_global.h -elf  -mpreferred-stack-boundary=2  ../../netinet/tcp_usrreq.c
../../netinet/tcp_usrreq.c: In function `tcp_usr_accept':
../../netinet/tcp_usrreq.c:424: syntax error before `int'
../../netinet/tcp_usrreq.c:424: `ostate' undeclared (first use in this function)
../../netinet/tcp_usrreq.c:424: (Each undeclared identifier is reported only once
../../netinet/tcp_usrreq.c:424: for each function it appears in.)
../../netinet/tcp_usrreq.c:418: warning: `tp' might be used uninitialized in this function
*** Error code 1

Stop in /usr/src/sys/compile/SNARK.


The error is generated if there is option TCPDEBUG in the kernel config,
and then works 

#define TCPDEBUG0 	int ostate

TCPDEBUG0 then is used in the definition of COMMON_START(). Usually
COMMON_START() is placed immidiately after the definitions, but in the
couple of places it is not the case and thus the syntax error occured.

Fix: As a workaround the following patch can be used:
How-To-Repeat: 
	1) Update sources
	2) Put option TCPDEBUG in the kernel config
	3) Try to compile the kernel
Comment 1 jlemon freebsd_committer freebsd_triage 2001-03-13 14:47:29 UTC
State Changed
From-To: open->closed

Fixed.