From owner-freebsd-bugs Thu Aug 10 17:40: 6 2000 Delivered-To: freebsd-bugs@freebsd.org Received: from freefall.freebsd.org (freefall.FreeBSD.ORG [204.216.27.21]) by hub.freebsd.org (Postfix) with ESMTP id B3B4E37B93A for ; Thu, 10 Aug 2000 17:40:00 -0700 (PDT) (envelope-from gnats@FreeBSD.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.9.3/8.9.2) id RAA77164; Thu, 10 Aug 2000 17:40:01 -0700 (PDT) (envelope-from gnats@FreeBSD.org) Received: from drugs.dv.isc.org (drugs.dv.isc.org [130.155.191.236]) by hub.freebsd.org (Postfix) with ESMTP id AFBF637B8F9 for ; Thu, 10 Aug 2000 17:32:12 -0700 (PDT) (envelope-from marka@drugs.dv.isc.org) Received: (from marka@localhost) by drugs.dv.isc.org (8.9.3/8.9.3) id KAA20407; Fri, 11 Aug 2000 10:33:59 +1000 (EST) (envelope-from marka) Message-Id: <200008110033.KAA20407@drugs.dv.isc.org> Date: Fri, 11 Aug 2000 10:33:59 +1000 (EST) From: Mark.Andrews@nominum.com Reply-To: Mark.Andrews@nominum.com To: FreeBSD-gnats-submit@freebsd.org X-Send-Pr-Version: 3.2 Subject: misc/20530: CMSG_DATA requires additional header file to be included Sender: owner-freebsd-bugs@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org >Number: 20530 >Category: misc >Synopsis: CMSG_DATA requires additional header file to be included >Confidential: no >Severity: serious >Priority: medium >Responsible: freebsd-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Thu Aug 10 17:40:01 PDT 2000 >Closed-Date: >Last-Modified: >Originator: Mark Andrews >Release: FreeBSD 4.1-STABLE i386 >Organization: Nominum >Environment: FreeBSD drugs.dv.isc.org 4.1-STABLE FreeBSD 4.1-STABLE #0: Tue Aug 8 18:01:02 EST 2000 marka@drugs.dv.isc.org:/usr/obj/usr/src/sys/DRUGS i386 >Description: The CMSG_* macros use macros not defined in and causing linkage failures. CMSG_* macros manipulate data returned / sent by recvmsg() / sendmsg(). The only header files that should be required by a application are and . FreeBSD is currently gratuitously differnet in its requirements w.r.t. the CMSG_* macros. >How-To-Repeat: The following compiles and links on all platforms except FreeBSD, it is not expected to run without errors. #include #include int main() { struct msghdr *msghdr = (struct msghdr *)0; struct cmsghdr *cmsghdr; unsigned char *data; cmsghdr = CMSG_FIRSTHDR(msghdr); data = CMSG_DATA(cmsghdr); } >Fix: Add #include to or redefine relevent CMSG_* macros to use things only defined in and . >Release-Note: >Audit-Trail: >Unformatted: To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-bugs" in the body of the message