1251876Speter/*
2251876Speter * Copyright (c) 2014 The FreeBSD Foundation.
3251876Speter * All rights reserved.
4251876Speter *
5251876Speter * Portions of this software were developed by Konstantin Belousov
6251876Speter * under sponsorship from the FreeBSD Foundation.
7251876Speter *
8251876Speter * Redistribution and use in source and binary forms, with or without
9251876Speter * modification, are permitted provided that the following conditions
10251876Speter * are met:
11251876Speter * 1. Redistributions of source code must retain the above copyright
12251876Speter *    notice(s), this list of conditions and the following disclaimer as
13251876Speter *    the first lines of this file unmodified other than the possible
14251876Speter *    addition of one or more copyright notices.
15251876Speter * 2. Redistributions in binary form must reproduce the above copyright
16251876Speter *    notice(s), this list of conditions and the following disclaimer in
17251876Speter *    the documentation and/or other materials provided with the
18251876Speter *    distribution.
19251876Speter *
20251876Speter * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDER(S) ``AS IS'' AND ANY
21251876Speter * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
22251876Speter * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
23251876Speter * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE COPYRIGHT HOLDER(S) BE
24251876Speter * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
25251876Speter * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
26251876Speter * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
27251876Speter * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
28251876Speter * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
29251876Speter * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
30251876Speter * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
31251876Speter */
32251876Speter
33251876Speter#include <sys/cdefs.h>
34251876Speter__FBSDID("$FreeBSD: releng/10.2/lib/libc/sys/recvmsg.c 277317 2015-01-18 11:54:20Z kib $");
35251876Speter
36251876Speter#include <sys/types.h>
37251876Speter#include <sys/syscall.h>
38251876Speter#include <sys/socket.h>
39251876Speter#include "libc_private.h"
40251876Speter
41251876Speter__weak_reference(__sys_recvmsg, __recvmsg);
42251876Speter
43251876Speter#pragma weak recvmsg
44251876Speterssize_t
45251876Speterrecvmsg(int s, struct msghdr *msg, int flags)
46251876Speter{
47251876Speter
48251876Speter	return (((int (*)(int, struct msghdr *, int))
49251876Speter	    __libc_interposing[INTERPOS_recvmsg])(s, msg, flags));
50251876Speter}
51251876Speter