Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 25 Aug 2000 18:01:59 -0700
From:      Ed Alley <alley1@llnl.gov>
To:        freebsd-questions@freebsd.org
Subject:   sockaddr differences
Message-ID:  <200008260101.SAA02730@jordan.llnl.gov>

next in thread | raw e-mail | index | archive | help


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




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200008260101.SAA02730>