public inbox for glibc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "dank at kegel dot com" <sourceware-bugzilla@sourceware.org>
To: glibc-bugs@sources.redhat.com
Subject: [Bug libc/2486] New: <netinet/in.h> does not compile in C++.  Patch with conventional fix available.
Date: Fri, 24 Mar 2006 23:52:00 -0000	[thread overview]
Message-ID: <20060324235219.2486.dank@kegel.com> (raw)

This is a classic, longstanding bug in all versions of glibc
and many other C libraries.  The essence is that

struct ip_opts {
    ...
    char ip_opts[40]; 
    ...

is not legal C++.  The traditional way of fixing this is to
capitalize the first letter of the member when compiling for C++.
A patch which does this, and applies to all versions of glibc is at
http://www.pengutronix.de/software/ptxdist/patches-0.5.2/glibc-2.2.5/generic/glibc-2.2.5-ip_opts.patch

There have been repeated requests to fix this over the years,
but for some reason, nobody filed a glibc bug report before!
Here are a few old posts about the problem in general, and how it's
been fixed elsewhere:
http://cvs.openbsd.org/cgi-bin/query-pr-wrapper?full=yes&numbers=681
http://gcc.gnu.org/ml/gcc/2002-05/msg00791.html
http://www.cygwin.com/ml/ecos-patches/2002-06/msg00005.html
http://www.netbsd.org/cgi-bin/query-pr-single.pl?number=19880

So, time to apply this patch in glibc head (and to the head of
the 2.3 branch, if possible)?

-- 
           Summary: <netinet/in.h> does not compile in C++.  Patch with
                    conventional fix available.
           Product: glibc
           Version: 2.4
            Status: NEW
          Severity: normal
          Priority: P2
         Component: libc
        AssignedTo: drepper at redhat dot com
        ReportedBy: dank at kegel dot com
                CC: glibc-bugs at sources dot redhat dot com


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

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


             reply	other threads:[~2006-03-24 23:52 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-03-24 23:52 dank at kegel dot com [this message]
2006-03-25  0:51 ` [Bug libc/2486] " dank at kegel dot com
2006-03-25  0:52 ` dank at kegel dot com
2006-03-25  1:18 ` mec at google dot com

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20060324235219.2486.dank@kegel.com \
    --to=sourceware-bugzilla@sourceware.org \
    --cc=glibc-bugs@sources.redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).