Date: Sun, 18 Jun 2006 09:07:20 +0200 From: Alberto Rizzi <greenant@fastmail.fm> To: Tofik Suleymanov <secnews@oxygen.az> Cc: questions@freebsd.org Subject: Re: socketpair(2) strange behavior Message-ID: <4494FBA8.2040705@fastmail.fm> In-Reply-To: <4492D1E9.8080904@oxygen.az> References: <4492D1E9.8080904@oxygen.az>
next in thread | previous in thread | raw e-mail | index | archive | help
Tofik Suleymanov ha scritto: > Hello list, > > when using socketpair(2) on my FreeBSD 6.1-RELEASE-p1 box i get this > error: > "socketpair: Operation not supported" > > And here is the source of my pretty simple socketpair(2) program: > ---- START ---- > #include <sys/types.h> > #include <sys/socket.h> > #include <stdio.h> > #include <errno.h> > > int main(void) { > int sv[2], err; > err = socketpair(AF_INET, SOCK_STREAM, 0, (int*)&sv); > if(err == -1) { > perror("socketpair"); > return -1; > } > > return 0x0; > } > ---- END ---- > > Any comments ? > > > Sincerely, > Tofik Suleymanov > Maybe you have to change (int*) &sv with sv because &sv returns an int**, not int*
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?4494FBA8.2040705>