Opened 15 years ago
Closed 5 years ago
#2632 closed bug (fixed)
Possible redefinition for struct sockaddr_in, related to IPv6
|Reported by:||andreasf||Owned by:||nobody|
|Component:||Network & Internet/IPv6||Version:||R1/pre-alpha1|
The POSIX headers
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 by , 15 years ago
comment:2 by , 15 years ago
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
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 by , 15 years ago
|Status:||new → closed|
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 by , 15 years ago
|Status:||closed → reopened|
|Summary:||Duplicate definitions in netinet/in.h and netinet/NetAddress.h → Possible 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 by , 15 years ago
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 by , 15 years ago
Compiling Git (git.git master, post 1.6.0-rc3) without setting
NO_IPV6=YesPlease in the
comment:7 by , 12 years ago
|Component:||- General → Network & Internet/IPv6|
comment:8 by , 12 years ago
comment:9 by , 8 years ago
|Milestone:||R1 → Unscheduled|
Moving IPv6 related tickets out of R1 milestone.
comment:10 by , 6 years ago
|Status:||reopened → assigned|
comment:11 by , 5 years ago
|Status:||assigned → closed|
There is only one definition of sockaddr_in in the tree now.
Sorry. The error does occur, with the headers I'm a little wrong:
netinet/in.his not in posix but in legacy,
in6.his in posix though, complicated...