Bug 85741 - [patch] /usr/include/resolv.h does not compile in simple test program.
Summary: [patch] /usr/include/resolv.h does not compile in simple test program.
Status: Closed FIXED
Alias: None
Product: Base System
Classification: Unclassified
Component: kern (show other bugs)
Version: Unspecified
Hardware: Any Any
: Normal Affects Only Me
Assignee: freebsd-bugs (Nobody)
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-09-05 12:40 UTC by Federico GDB
Modified: 2018-07-04 08:01 UTC (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Federico GDB 2005-09-05 12:40:16 UTC
Simple test program does not compile. 
It needs #include <netinet/in.h> for definition of address types.

Fix: 

/*--greYswFliVOafCACB9vo6ZaBh4fcXkfM2Cuc4IyUEDQptvym
Content-Type: text/plain; name="file.diff"
Content-Transfer-Encoding: 7bit
Content-Disposition: attachment; filename="file.diff"

*** resolv.h.orig       Fri Sep  2 18:42:55 2005
--- resolv.h    Fri Sep  2 18:44:28 2005
***************
*** 61,66 ****
--- 61,67 ----
  #include <sys/types.h>
  #include <sys/cdefs.h>
  #include <sys/socket.h>
+ #include <netinet/in.h>
  #include <stdio.h>
How-To-Repeat: compile:
#include <resolv.h>
main ()
{
}
Comment 1 Mark Linimon freebsd_committer freebsd_triage 2005-09-05 14:45:29 UTC
Responsible Changed
From-To: freebsd-i386->freebsd-bugs

This is not i386-specific.
Comment 2 Craig Rodrigues freebsd_committer freebsd_triage 2005-09-09 20:37:56 UTC
State Changed
From-To: open->closed

Your testcase is wrong.  Look at the man page for resolver(3) 
for the correct includes to use before including <resolv.h.