[vlc-devel] Re: compiling of rootwrap.c fails !!

Kuldipsingh Pabla Kuldipsingh.Pabla at Sun.COM
Mon Sep 11 21:49:28 CEST 2006


Hi May,

You will need to make the following changes:

add the following lines to rootwrap.c
#ifndef AF_LOCAL
#define AF_LOCAL AF_UNIX
#endif

-Kuldip

may nothing wrote:
> Hi, 
> I try to compile the latest snapshoot of vlc on a sparc solaris 10 box (gcc4.1.1 & gnu ld)
> Unless the fact that this has never worked before I always get this errors:
> 
> 
> network/rootwrap.c: In function 'send_fd':
> network/rootwrap.c:127: warning: implicit declaration of function 'CMSG_SPACE'
> network/rootwrap.c:134: error: 'struct msghdr' has no member named 'msg_control'
> network/rootwrap.c:135: error: 'struct msghdr' has no member named 'msg_controllen'
> network/rootwrap.c:137: warning: assignment from incompatible pointer type
> network/rootwrap.c:140: warning: implicit declaration of function 'CMSG_FIRSTHDR'
> network/rootwrap.c:140: warning: assignment makes pointer from integer without a cast
> network/rootwrap.c:143: warning: implicit declaration of function 'CMSG_LEN'
> network/rootwrap.c:144: warning: implicit declaration of function 'CMSG_DATA'
> network/rootwrap.c:144: warning: passing argument 1 of 'memcpy' makes pointer from integer without a cast
> network/rootwrap.c:145: error: 'struct msghdr' has no member named 'msg_controllen'
> network/rootwrap.c: In function 'rootwrap':
> network/rootwrap.c:277: error: 'AF_LOCAL' undeclared (first use in this function)
> network/rootwrap.c:277: error: (Each undeclared identifier is reported only once
> network/rootwrap.c:277: error: for each function it appears in.)
> network/rootwrap.c: In function 'recv_fd':
> network/rootwrap.c:328: error: 'struct msghdr' has no member named 'msg_control'
> network/rootwrap.c:329: error: 'struct msghdr' has no member named 'msg_controllen'
> network/rootwrap.c:331: warning: assignment from incompatible pointer type
> network/rootwrap.c:337: warning: assignment makes pointer from integer without a cast
> network/rootwrap.c:338: warning: implicit declaration of function 'CMSG_NXTHDR'
> network/rootwrap.c:338: warning: assignment makes pogmake[4]: *** [network/libvlc_la-rootwrap.lo] Error 1
> gmake[4]: Leaving directory `/space/vlc-0.8.6-svn/src'
> gmake[3]: *** [all-recursive] Error 1
> gmake[3]: Leaving directory `/space/vlc-0.8.6-svn/src'
> gmake[2]: *** [all] Error 2
> gmake[2]: Leaving directory `/space/vlc-0.8.6-svn/src'
> gmake[1]: *** [all-recursive] Error 1
> gmake[1]: Leaving directory `/space/vlc-0.8.6-svn'
> gmake: *** [all] Error 2
> 
> 
> it seems that the sys/socket.h is the problem. If _XPG4_2 is not defined the struct is not extended to the needed 'msg_control' ...
> But when I ad a #define _XPG4_2 in network/rootwrap.c , I get:
> 
> network/rootwrap.c: In function 'send_err':
> network/rootwrap.c:117: warning: implicit declaration of function 'send'
> network/rootwrap.c: In function 'send_fd':
> network/rootwrap.c:128: warning: implicit declaration of function 'CMSG_SPACE'
> network/rootwrap.c:138: warning: assignment from incompatible pointer type
> network/rootwrap.c:141: warning: implicit declaration of function 'CMSG_FIRSTHDR'
> network/rootwrap.c:141: warning: assignment makes pointer from integer without a cast
> network/rootwrap.c:144: warning: implicit declaration of function 'CMSG_LEN'
> network/rootwrap.c:145: warning: implicit declaration of function 'CMSG_DATA'
> network/rootwrap.c:145: warning: passing argument 1 of 'memcpy' makes pointer from integer without a cast
> network/rootwrap.c:148: warning: implicit declaration of function 'sendmsg'
> network/rootwrap.c: In function 'rootprocess':
> network/rootwrap.c:163: warning: implicit declaration of function 'recv'
> network/rootwrap.c:198: warning: implicit declaration of function 'socket'
> network/rootwrap.c:203: warning: implicit declaration of function 'setsockopt'
> network/rootwrap.c:208: warning: implicit declaration of function 'bind'
> network/rootwrap.c: In function 'close_rootwrap':
> network/rootwrap.c:225: warning: implicit declaration of function 'waitpid'
> network/rootwrap.c: In function 'rootwrap':
> network/rootwrap.c:244: warning: implicit declaration of function 'getrlimit'
> network/rootwrap.c:278: warning: implicit declaration of function 'socketpair'
> network/rootwrap.c:278: error: 'AF_LOCAL' undeclared (first use in this function)
> network/rootwrap.c:278: error: (Each undeclared identifier is reported only once
> network/rootwrap.c:278: error: for each function it appears in.)
> network/rootwrap.c: In function 'recv_fd':
> network/rootwrap.c:332: warning: assignment from incompatible pointer type
> network/rootwrap.c:335: warning: implicit declaration of function 'recvmsg'
> network/rootwrap.c:338: warning: assignment makes pointer from integer without a cast
> network/rootwrap.c:339: warning: implicit declaration of function 'CMSG_NXTHDR'
> network/rootwrap.c:339: warning: assignment makes pointer from integer without a cast
> network/rootwrap.c:343: warning: comparison between signed and unsigned
> network/rootwrap.c:345: warning: passing argument 2 of 'memcpy' makes pointer from integer without a cast
> gmake[4]: *** [network/libvlc_la-rootwrap.lo] Error 1
> gmake[4]: Leaving directory `/space/vlc-0.8.6-svn/src'
> gmake[3]: *** [all-recursive] Error 1
> gmake[3]: Leaving directory `/space/vlc-0.8.6-svn/src'
> gmake[2]: *** [all] Error 2
> gmake[2]: Leaving directory `/space/vlc-0.8.6-svn/src'
> gmake[1]: *** [all-recursive] Error 1
> gmake[1]: Leaving directory `/space/vlc-0.8.6-svn'
> gmake: *** [all] Error 2
> -bash-3.00#
> 
> 
> Please can somebody help me ?!?!?!?!?!?!?!
> 
> TIA
> 
> Martin
> 
> 
> 
> 
> 
> 
> 
> --
> This is the vlc-devel mailing-list, see http://www.videolan.org/vlc/
> To unsubscribe, please read http://developers.videolan.org/lists.html
> 

-- 
This is the vlc-devel mailing-list, see http://www.videolan.org/vlc/
To unsubscribe, please read http://developers.videolan.org/lists.html



More information about the vlc-devel mailing list