[BACK]Return to test-cmsg.c CVS log [TXT][DIR] Up to [cvsweb.bsd.lv] / mandoc

File: [cvsweb.bsd.lv] / mandoc / test-cmsg.c (download)

Revision 1.1, Wed Feb 8 16:11:41 2017 UTC (3 years, 5 months ago) by schwarze
Branch: MAIN
CVS Tags: VERSION_1_14_5, VERSION_1_14_4, VERSION_1_14_3, VERSION_1_14_2, VERSION_1_14_1, HEAD

config glue for recvmsg(2) and CMSG_FIRSTHDR(3);
needed for Solaris 11

#include <stddef.h>
#include <sys/socket.h>

int
main(void)
{
	struct msghdr	 msg;

	msg.msg_control = NULL;
	msg.msg_controllen = 0;

	return CMSG_FIRSTHDR(&msg) != NULL;
}