Date: Sun, 30 Aug 1998 10:07:16 -0500 (CDT) From: Joel Ray Holveck <joelh@gnu.org> To: abelits@phobos.illtel.denver.co.us Cc: chanders@timing.com, freebsd-hackers@FreeBSD.ORG, brhall@timing.com Subject: Re: Help with passing fd on FreeBSD Message-ID: <199808301507.KAA07248@detlev.UUCP> In-Reply-To: <Pine.LNX.4.02A.9808292150540.19313-100000@phobos.illtel.denver.co.us> (message from Alex Belits on Sat, 29 Aug 1998 22:24:42 -0700 (PDT)) References: <Pine.LNX.4.02A.9808292150540.19313-100000@phobos.illtel.denver.co.us>
next in thread | previous in thread | raw e-mail | index | archive | help
>> 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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199808301507.KAA07248>