From owner-freebsd-questions Fri Aug 25 18: 1:15 2000 Delivered-To: freebsd-questions@freebsd.org Received: from jordan.llnl.gov (jordan.llnl.gov [128.115.36.14]) by hub.freebsd.org (Postfix) with ESMTP id 7D64037B43C for ; Fri, 25 Aug 2000 18:01:13 -0700 (PDT) Received: (from wea@localhost) by jordan.llnl.gov (8.9.3/8.9.3) id SAA02730 for freebsd-questions@freebsd.org; Fri, 25 Aug 2000 18:01:59 -0700 Date: Fri, 25 Aug 2000 18:01:59 -0700 From: Ed Alley Message-Id: <200008260101.SAA02730@jordan.llnl.gov> To: freebsd-questions@freebsd.org Subject: sockaddr differences Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG I have been porting some of my software to freebsd and noticed an irritating difference. On every platform that my software has run on the sockaddr structures have had similar members except for FreeBSD! For instance on all other systems that I have run on: struct sockaddr_un { u_char sun_family; char sun_path[104]; }; However FreeBSD has: struct sockaddr_un { u_char sun_len; u_char sun_family; char sun_path[104]; }; This difference introduced some subtle bugs; I really began to think that I had forgotten how to program. First Question: Why is FreeBSD different? Second Question: Does anyone know of a simple way that I can program around this without putting in a lot of ifdefs in my programs? Ed Alley wea@llnl.gov To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message