Bug 602 - enormous bitching about netdb.h
Summary: enormous bitching about netdb.h
Status: CLOSED FIXED
Alias: None
Product: Portable OpenSSH
Classification: Unclassified
Component: Build system (show other bugs)
Version: 3.6.1p2
Hardware: All All
: P2 normal
Assignee: OpenSSH Bugzilla mailing list
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2003-06-24 18:42 AEST by Ted Mittelstaedt
Modified: 2004-04-14 12:24 AEST (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Ted Mittelstaedt 2003-06-24 18:42:58 AEST
System is Sparc running Solaris 2.5.1

when typing "make" I get the following error on just about every single
.c file compiled, here is a sample:

In file included from includes.h:54,
                 from authfd.c:37:
/usr/include/netdb.h:195: warning: `struct sockaddr_in' declared inside 
parameter list
/usr/include/netdb.h:195: warning: its scope is only this definition or 
declaration, which is probably not what you want.
Comment 1 Darren Tucker 2003-06-24 19:00:03 AEST
In which header file under /usr/include is "struct sockaddr_in" defined?
Comment 2 Ted Mittelstaedt 2003-06-24 20:46:35 AEST
it appears to be /usr/include/netinet/in.h
Comment 3 Darren Tucker 2003-06-24 21:03:35 AEST
In includes.h, try moving the line "#include <netinet/in.h>" to just before the 
line "#include <netdb.h>" and see if that stops the errors.
Comment 4 Ted Mittelstaedt 2003-06-24 21:25:37 AEST
yes that appears to have fixed the problem.

Most of the source files build without complaints now.  There are a few
that have other complaints such as

-helper\" -DHAVE_CONFIG_H -c xmalloc.c
xmalloc.c: In function `xstrdup':
xmalloc.c:66: warning: implicit declaration of function `strlcpy'

and

misc.c: In function `set_nodelay':
misc.c:99: warning: passing arg 4 of `getsockopt' from incompatible pointer type
misc.c:109: warning: passing arg 4 of `setsockopt' from incompatible pointer 
type

that are isolated to just a few files.  Would you like a list of these?
Comment 5 Damien Miller 2003-06-24 21:33:46 AEST
Bug #565 is for compiler warnings, attach them to it.
Comment 6 Darren Tucker 2003-06-24 22:09:56 AEST
Should includes.h be reordered, what's the best order to avoid breaking 
something else?
Comment 7 Damien Miller 2003-06-28 17:54:46 AEST
make the change and see what breaks :)

I think moving netdb.h to below netinet/in.h is pretty safe though.
Comment 8 Darren Tucker 2003-06-29 21:25:03 AEST
Moved include of netdb.h: 
20030629
 - (dtucker) Bug #602: move #include of netdb.h to after in.h (fixes compiler
   warnings on Solaris 2.5.1).
Comment 9 Damien Miller 2004-04-14 12:24:19 AEST
Mass change of RESOLVED bugs to CLOSED