Bug 635260 - Incorrect #define in netinet/ip.h
Summary: Incorrect #define in netinet/ip.h
Keywords:
Status: CLOSED NEXTRELEASE
Alias: None
Product: Fedora
Classification: Fedora
Component: glibc
Version: 13
Hardware: x86_64
OS: Linux
low
medium
Target Milestone: ---
Assignee: Andreas Schwab
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
: 622910 (view as bug list)
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2010-09-18 13:30 UTC by James Valleroy
Modified: 2016-11-24 15:48 UTC (History)
5 users (show)

Fixed In Version: 2.12.90-14
Clone Of:
Environment:
Last Closed: 2010-10-05 13:10:47 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description James Valleroy 2010-09-18 13:30:53 UTC
Description of problem:
I am unable to compile a program that uses glibc. Here is the error message when building:
[jvalleroy@fed13 olsrd-0.6.0]$ make
/usr/bin/ccache gcc -Wall -Wextra -Wold-style-definition -Wdeclaration-after-statement -Wmissing-prototypes -Wstrict-prototypes -Wmissing-declarations -Wsign-compare -Waggregate-return -Wmissing-noreturn -Wmissing-format-attribute -Wno-multichar -Wno-deprecated-declarations -Wendif-labels -Wwrite-strings -Wbad-function-cast -Wpointer-arith -Wcast-qual -Wshadow -Wsequence-point -Wpointer-arith -Wcast-align -Wnested-externs -Winline -Wdisabled-optimization -finline-functions-called-once -funit-at-a-time -fearly-inlining -finline-limit=350   -fPIC -ggdb -Isrc -pthread  -DUSE_FPM -Dlinux -DLINUX_NETLINK_ROUTING -DDEBUG    -c -o src/unix/ifnet.o src/unix/ifnet.c
src/unix/ifnet.c: In function ‘chk_if_up’:
src/unix/ifnet.c:551: error: ‘tos’ undeclared (first use in this function)
src/unix/ifnet.c:551: error: (Each undeclared identifier is reported only once
src/unix/ifnet.c:551: error: for each function it appears in.)
make: *** [src/unix/ifnet.o] Error 1

Based on discussion at the olsr-users mailing list, it appears to be caused by an incorrect #define in /usr/include/netinet/ip.h:
[jvalleroy@fed13 ~]$ cat /usr/include/netinet/ip.h | grep IPTOS_CLASS
#define	IPTOS_CLASS_MASK		0xe0
#define	IPTOS_CLASS(class)		((tos) & IPTOS_CLASS_MASK)
...
#define	IPTOS_PREC(tos)			IPTOS_CLASS(tos)
...

It would appear that the "tos" in the IPTOS_CLASS line does not match the parameter named "class".

Version-Release number of selected component (if applicable):
glibc-2.12-3.x86_64

How reproducible:
Very

Steps to Reproduce:
1. Download olsrd-0.6.0 source: http://www.olsr.org/releases/0.6/olsrd-0.6.0.tar.gz
2. make
3.
  
Actual results:
Displayed above.

Expected results:
Successful build. The build succeeds with glibc-2.11.2.

Additional info:

Comment 1 James Valleroy 2010-10-01 00:49:10 UTC
This bug is fixed in version 2.12.90-14, which is in rawhide.

Comment 2 Andreas Schwab 2010-10-05 13:12:30 UTC
*** Bug 622910 has been marked as a duplicate of this bug. ***


Note You need to log in before you can comment on or make changes to this bug.