From owner-freebsd-hackers Wed May 10 23:35:27 2000 Delivered-To: freebsd-hackers@freebsd.org Received: from news.IAEhv.nl (news.IAE.nl [194.151.64.4]) by hub.freebsd.org (Postfix) with ESMTP id E0B5937B788 for ; Wed, 10 May 2000 23:35:04 -0700 (PDT) (envelope-from marc@bowtie.nl) Received: (from uucp@localhost) by news.IAEhv.nl (8.9.1/8.9.1) with IAEhv.nl id IAA03675 for hackers@freebsd.org; Thu, 11 May 2000 08:35:04 +0200 (MET DST) Received: from localhost (localhost [127.0.0.1]) by bowtie.nl (8.8.8/8.8.8) with ESMTP id IAA10990 for ; Thu, 11 May 2000 08:30:31 +0200 (CEST) (envelope-from marc@bowtie.nl) Message-Id: <200005110630.IAA10990@bowtie.nl> X-Mailer: exmh version 2.0.2 2/24/98 To: hackers@freebsd.org Subject: CMSG_DATA and ALIGN macro Reply-To: marc@bowtie.nl Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Thu, 11 May 2000 08:30:31 +0200 From: Marc van Kempen Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG Hi, I tried sending this to freebsd-doc, but perhaps this place is better suited. The problem is that the ALIGN macro is not being picked up even though and are included. The problem arises from the use of the CMSG_DATA macro, which seems to be related to sendmsg(), and uses the ALIGN macro. The manual page for sendmsg() or similar states that you only need and , but this fails, it only works if you also include where the ALIGN macro is defined. So the question is: is the manual page in error or are the include files wrong? If it's the manual page, in which manual page are you supposed to find information about the use of the CMSG_DATA macro? Otherwise I suppose the include file should include ? See the example program, it doesn't compile without the include. #include #include #include int main(int argc, char **argv) { struct msghdr msg; unsigned char *data; data = CMSG_DATA(&msg); return(0); } Marc. -- ---------------------------------------------------- Marc van Kempen BowTie Technology Email: marc@bowtie.nl WWW & Databases tel. +31 40 2 43 20 65 fax. +31 40 2 44 21 86 http://www.bowtie.nl ---------------------------------------------------- To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message