This is the mail archive of the glibc-bugs@sources.redhat.com mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug libc/1067] New: recvmsg, sendmsg broken on 64 bit architectures due to different struct msghdr definition in glibc and Linux kernel


recvmsg and sendmsg are broken on 64-bit architectures due to different  
definitions of struct msghdr in the Linux kernel (2.6.12) and the glibc  
(2.3.5).   
  
In the kernel <linux/socket.h>:  
struct msghdr {  
	void	*	msg_name;  
	int		msg_namelen;  
	struct iovec *	msg_iov;	  
	__kernel_size_t	msg_iovlen;  
	void 	*	msg_control;  
	__kernel_size_t	msg_controllen;  
	unsigned	msg_flags;  
};  
  
In the glibc <bits/socket.h>:  
struct msghdr  
  {  
    void *msg_name;        
    socklen_t msg_namelen;  
    struct iovec *msg_iov;  
    int msg_iovlen;         
    void *msg_control;      
    socklen_t msg_controllen;  
    int msg_flags;             
  };  
  
msg_iovlen and msg_controllen are 64 bit wide in the kernel header and 32 bit  
wide in the glibc header.

-- 
           Summary: recvmsg, sendmsg broken on 64 bit architectures due to
                    different struct msghdr definition in glibc and Linux
                    kernel
           Product: glibc
           Version: 2.3.5
            Status: NEW
          Severity: normal
          Priority: P2
         Component: libc
        AssignedTo: gotom at debian dot or dot jp
        ReportedBy: christoph dot stueckjuergen at siemens dot com
                CC: glibc-bugs at sources dot redhat dot com
  GCC host triplet: mips64-linux-gnu
GCC target triplet: mips64-linux-gnu


http://sources.redhat.com/bugzilla/show_bug.cgi?id=1067

------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]