Opened 10 years ago

Closed 7 days ago

#2632 closed bug (fixed)

Possible redefinition for struct sockaddr_in, related to IPv6

Reported by: andreasf Owned by: nobody
Priority: normal Milestone: Unscheduled
Component: Network & Internet/IPv6 Version: R1/pre-alpha1
Keywords: Cc: phoudoin
Blocked By: Blocking:
Has a Patch: no Platform: All

Description

The POSIX headers netinet/in.h and netinet/NetAdress.h appear to duplicate some definitions.

This somehow leads to a redefinition error for struct sockaddr_in when compiling Git with IPv6 support.

Change History (11)

comment:1 Changed 10 years ago by andreasf

Sorry. The error does occur, with the headers I'm a little wrong: netinet/in.h is not in posix but in legacy, in6.h is in posix though, complicated...

comment:2 Changed 10 years ago by andreasf

Really sorry for the confusion, but my original report was right. Spotlight just managed to delete some files while I was looking at them.

There are two files in headers/posix/netinet/in/, in.h and NetAddress.h, for which a diff shows no difference at all. opengroup.org has no mention of a NetAddress.h, so I suggest we move or drop it.

comment:3 Changed 10 years ago by axeld

Resolution: invalid
Status: newclosed

Not sure what your system messed up there, but NetAddress.h is in headers/os/net/, and not in posix/netinet. Also, it has completely different contents than in.h, it just happens to include it.

If you still find something wrong with the current setup, feel free to reopen this bug, though; maybe I just didn't understand you correctly :-)

comment:4 Changed 10 years ago by andreasf

Resolution: invalid
Status: closedreopened
Summary: Duplicate definitions in netinet/in.h and netinet/NetAddress.hPossible redefinition for struct sockaddr_in, related to IPv6

Git confirms that some files have been wrongly moved around somehow on my Mac, yeah. But that's the wrong explanation only.

The problem of struct sockaddr_in being redefined occurs while compiling on a Haiku system, so that is still a problem. Unfortunately in this case I have absolutely no explanation at hand. I checked the header guards, and they looked okay.

I am aware that IPv6 is not or not fully supported yet, but in that case I'd expect to either find that out at runtime, or at compile-time by missing IPv6 structs, functions etc. Not by conflicts with otherwise fine IPv4 stuff.

comment:5 Changed 10 years ago by anevilyak

Just curious, what's the testcase that's causing it to fail? I've compiled various other pieces of network code without issues on Haiku itself, so it'd be helpful to have some more specifics here.

comment:6 Changed 10 years ago by andreasf

Compiling Git (git.git master, post 1.6.0-rc3) without setting NO_IPV6=YesPlease in the Makefile.

comment:7 Changed 8 years ago by scottmc

Component: - GeneralNetwork & Internet/IPv6

comment:8 Changed 8 years ago by phoudoin

Cc: phoudoin added

comment:9 Changed 4 years ago by luroh

Milestone: R1Unscheduled

Moving IPv6 related tickets out of R1 milestone.

comment:10 Changed 18 months ago by axeld

Owner: changed from axeld to nobody
Status: reopenedassigned

comment:11 Changed 7 days ago by waddlesplash

Resolution: fixed
Status: assignedclosed

There is only one definition of sockaddr_in in the tree now.

Note: See TracTickets for help on using tickets.