1 /* PR middle-end/36520 */
2 /* Testcase by Richard Guenther <rguenth@gcc.gnu.org> */
4 typedef long unsigned int size_t;
5 typedef unsigned short int sa_family_t
;
8 __extension__
unsigned char __cmsg_data
[];
10 typedef unsigned int uint32_t;
13 uint32_t u6_addr32
[4];
17 sa_family_t sin_family
;
20 struct in6_addr ipi6_addr
;
23 struct sockaddr_in sin
;
25 static sockaddr_any src_addr
;
27 inline struct cmsghdr
* cmsg_put(struct cmsghdr
*cm
, int type
, void *data
, size_t len
)
29 memcpy(((cm
)->__cmsg_data
), data
, len
);
32 int hop_sendmsg(int fd
) {
34 if (src_addr
.sin
.sin_family
) {
35 if (src_addr
.sin
.sin_family
== 2) {
36 struct in6_pktinfo info
;
37 cm
= cmsg_put(cm
, 50, &info
, sizeof(info
));