Bug 27089 - Missing include in /usr/include/sys/conf.h
Summary: Missing include in /usr/include/sys/conf.h
Status: Closed FIXED
Alias: None
Product: Base System
Classification: Unclassified
Component: conf (show other bugs)
Version: 5.0-CURRENT
Hardware: Any Any
: Normal Affects Only Me
Assignee: freebsd-bugs (Nobody)
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2001-05-05 08:10 UTC by Udo Schweigert
Modified: 2018-03-30 18:19 UTC (History)
0 users

See Also:


Attachments
file.diff (230 bytes, patch)
2001-05-05 08:10 UTC, Udo Schweigert
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Udo Schweigert 2001-05-05 08:10:01 UTC
/usr/include/sys/conf.h references struct timespec which is defined in
/usr/include/sys/time.h. Since /usr/include/sys/time.h is not included by
/usr/include/sys/conf.h this results in an error (for example when trying
to build the sysutils/xosview port).

How-To-Repeat: Try to build port sysutils/xosview
Comment 1 Kris Kennaway 2001-05-06 06:32:07 UTC
On Sat, May 05, 2001 at 07:09:17AM +0000, Udo Schweigert wrote:

> /usr/include/sys/conf.h references struct timespec which is defined in
> /usr/include/sys/time.h. Since /usr/include/sys/time.h is not included by
> /usr/include/sys/conf.h this results in an error (for example when trying
> to build the sysutils/xosview port).

>  #include <sys/eventhandler.h>
> +#include <sys/time.h>

This is probably the wrong thing to do..the correct thing is to fix
the broken software which makes that assumption.

Kris
Comment 2 Bruce Evans 2001-05-06 11:01:03 UTC
On Sat, 5 May 2001, Kris Kennaway wrote:

>  On Sat, May 05, 2001 at 07:09:17AM +0000, Udo Schweigert wrote:
>  
>  > /usr/include/sys/conf.h references struct timespec which is defined in
>  > /usr/include/sys/time.h. Since /usr/include/sys/time.h is not included by
>  > /usr/include/sys/conf.h this results in an error (for example when trying
>  > to build the sysutils/xosview port).
>  
>  >  #include <sys/eventhandler.h>
>  > +#include <sys/time.h>
>  
>  This is probably the wrong thing to do..the correct thing is to fix
>  the broken software which makes that assumption.

It's not clear if the broken software is <sys/conf.h> or xosview.  A
few applications in /usr/src include <sys/conf.h>.  At least fstat/fstat.c
sort of needs to, since it wants convert kernel dev_t's to userland
dev_t's.  Kernel dev_t's are now pointers, and <sys/conf.h> is the
only place that declares the struct that they point to.  OTOH,
top/machine.c includes <sys/conf.h> for no reason.

Bruce
Comment 3 Poul-Henning Kamp freebsd_committer 2001-05-23 21:05:09 UTC
State Changed
From-To: open->closed

The mistake is entirely with xosview, <sys/conf.h> should have no 
user-servicable parts inside.
Comment 4 commit-hook freebsd_committer 2018-03-30 18:19:40 UTC
A commit references this bug:

Author: fernape
Date: Fri Mar 30 18:18:55 UTC 2018
New revision: 465989
URL: https://svnweb.freebsd.org/changeset/ports/465989

Log:
  Update www/caddy to 0.10.12

  PR:	27089
  Submitted by:	fabian.freyer@physik.tu-berlin.de
  Approved by:	tcberner (mentor)
  Differential Revision:	https://reviews.freebsd.org/D14903

Changes:
  head/www/caddy/Makefile
  head/www/caddy/distinfo