From owner-freebsd-hackers Sun Aug 30 08:11:30 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id IAA28298 for freebsd-hackers-outgoing; Sun, 30 Aug 1998 08:11:30 -0700 (PDT) (envelope-from owner-freebsd-hackers@FreeBSD.ORG) Received: from mail.camalott.com (mail.camalott.com [208.203.140.2]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id IAA28293 for ; Sun, 30 Aug 1998 08:11:28 -0700 (PDT) (envelope-from joelh@gnu.org) Received: from detlev.UUCP (tex-80.camalott.com [208.229.74.80]) by mail.camalott.com (8.8.7/8.8.5) with ESMTP id KAA09024; Sun, 30 Aug 1998 10:09:08 -0500 Received: (from joelh@localhost) by detlev.UUCP (8.9.1/8.9.1) id KAA07248; Sun, 30 Aug 1998 10:07:16 -0500 (CDT) (envelope-from joelh) Date: Sun, 30 Aug 1998 10:07:16 -0500 (CDT) Message-Id: <199808301507.KAA07248@detlev.UUCP> To: abelits@phobos.illtel.denver.co.us CC: chanders@timing.com, freebsd-hackers@FreeBSD.ORG, brhall@timing.com In-reply-to: (message from Alex Belits on Sat, 29 Aug 1998 22:24:42 -0700 (PDT)) Subject: Re: Help with passing fd on FreeBSD From: Joel Ray Holveck Reply-to: joelh@gnu.org References: Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG >> the structs in FreeBSD are slightly different, and I've never done >> this. > In FreeBSD CMSG_DATA(cm) macro is the equivalent to cm->cmsg_data > that is commented out in include files in 4.4BSD-derived, but exists > in other compatible systems. For instance, I had to do the following in Emacs 20.4 (I think mostly for Linux, but I don't remember now): (configure defines HAVE_SCM_RIGHTS if SOL_SOCKET and SCM_RIGHTS are defined; HAVE_CMSG_DATA if said macro is defined, and CMSG_HAS_CMSG_DATA if cmsg_data is a structure member.) #ifdef HAVE_SCM_RIGHTS # ifndef HAVE_CMSG_DATA # ifdef CMSG_HAS_CMSG_DATA # define CMSG_DATA(x) ((x)->cmsg_data) # else # define CMSG_DATA(x) ((char*)(x)+sizeof(*(x))) # endif # endif #endif Happy hacking, joelh -- Joel Ray Holveck - joelh@gnu.org - http://www.wp.com/piquan Fourth law of programming: Anything that can go wrong wi sendmail: segmentation violation - core dumped To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message