Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 2 Feb 2001 14:29:26 +0100 (CET)
From:      Hartmut Brandt <brandt@fokus.gmd.de>
To:        FreeBSD-gnats-submit@freebsd.org
Subject:   docs/24797: malloc(9) missing #includes in man-page
Message-ID:  <200102021329.f12DTQt02660@fokus.gmd.de>

next in thread | raw e-mail | index | archive | help

>Number:         24797
>Category:       docs
>Synopsis:       when using MALLOC_DEFINE sys/param.h and sys/kernel.h are needed
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-doc
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          doc-bug
>Submitter-Id:   current-users
>Arrival-Date:   Fri Feb 02 05:30:00 PST 2001
>Closed-Date:
>Last-Modified:
>Originator:     Harti Brandt
>Release:        FreeBSD 5.0-CURRENT i386
>Organization:
GMD Fokus, Berlin
>Environment:
System: FreeBSD beagle.fokus.gmd.de 5.0-CURRENT FreeBSD 5.0-CURRENT #2: Fri Feb 2 10:58:07 CET 2001 hbb@beagle.fokus.gmd.de:/opt/obj/usr/src/sys/BEAGLE i386
>Description:

It should be documented in malloc(9) that sys/param.h is needed to get
NULL defined and sys/kernel.h to get SYSINIT defined when one uses
MALLOC_DEFINE().

>How-To-Repeat:

Try to compile this file:

# include <sys/types.h>
# include <sys/malloc.h>

MALLOC_DEFINE(M_FOOBUF, "foobuffers", "Buffers to foo data into the ether");

and see the compile errors.

>Fix:

Add something like

.Fd #include <sys/param.h>
.Fd #inclued <sys/kernel.h>

just above the line

MALLOC_DEFINE(M_FOOBUF, "foobuffers", "Buffers to foo data into the ether");

in the man page.

>Release-Note:
>Audit-Trail:
>Unformatted:


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-doc" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200102021329.f12DTQt02660>