This is the mail archive of the glibc-bugs@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug libc/11903] New: undefined variable in IPTOS_CLASS macro in sysdeps/generic/netinet/ip.h


Commit dca5d51ebfe240eac1cd030e8c902a25b7a363a5 [1] with commit message
  "Define IPTOS_CLASS_* macros according to RFC 2474."
introduced new IPTOS_CLASS macro.

This macro contains an undefined variable (looks like just a typo).
The macro is
  #define        IPTOS_CLASS(class)              ((tos) & IPTOS_CLASS_MASK)
Note the "class" vs "tos" difference.

This leads to compilation errors due to a line like
  int precedence = IPTOS_PREC(olsr_cnf->tos);
turns into
  int precedence = ((tos) & 0xe0);
and
  error: ?tos? undeclared (first use in this function)

[1] 
http://repo.or.cz/w/glibc.git/blobdiff/ace4e23f8c495927d3f24554b41560858ee50d4f.
.dca5d51ebfe240eac1cd030e8c902a25b7a363a5:/sysdeps/generic/netinet/ip.h

-- 
           Summary: undefined variable in IPTOS_CLASS macro in
                    sysdeps/generic/netinet/ip.h
           Product: glibc
           Version: 2.13
            Status: NEW
          Severity: normal
          Priority: P2
         Component: libc
        AssignedTo: drepper at redhat dot com
        ReportedBy: bikovevg at iitp dot ru
                CC: glibc-bugs at sources dot redhat dot com
 GCC build triplet: x86_64-redhat-linux
  GCC host triplet: x86_64-redhat-linux
GCC target triplet: x86_64-redhat-linux


http://sourceware.org/bugzilla/show_bug.cgi?id=11903

------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]