Deleted Added
full compact
interposing_table.c (281454) interposing_table.c (281981)
1/*
2 * Copyright (c) 2014 The FreeBSD Foundation.
3 * All rights reserved.
4 *
5 * Portions of this software were developed by Konstantin Belousov
6 * under sponsorship from the FreeBSD Foundation.
7 *
8 * Redistribution and use in source and binary forms, with or without

--- 17 unchanged lines hidden (view full) ---

26 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
27 * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
28 * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
29 * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
30 * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
31 */
32
33#include <sys/cdefs.h>
1/*
2 * Copyright (c) 2014 The FreeBSD Foundation.
3 * All rights reserved.
4 *
5 * Portions of this software were developed by Konstantin Belousov
6 * under sponsorship from the FreeBSD Foundation.
7 *
8 * Redistribution and use in source and binary forms, with or without

--- 17 unchanged lines hidden (view full) ---

26 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
27 * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
28 * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
29 * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
30 * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
31 */
32
33#include <sys/cdefs.h>
34__FBSDID("$FreeBSD: stable/10/lib/libc/sys/interposing_table.c 281454 2015-04-12 06:52:43Z kib $");
34__FBSDID("$FreeBSD: stable/10/lib/libc/sys/interposing_table.c 281981 2015-04-25 08:14:08Z kib $");
35
36#include <sys/types.h>
37#include "libc_private.h"
38
39#define SLOT(a, b) \
40 [INTERPOS_##a] = (interpos_func_t)b
41interpos_func_t __libc_interposing[INTERPOS_MAX] = {
42 SLOT(accept, __sys_accept),

--- 28 unchanged lines hidden (view full) ---

71 SLOT(tcdrain, __libc_tcdrain),
72 SLOT(wait4, __sys_wait4),
73 SLOT(write, __sys_write),
74 SLOT(writev, __sys_writev),
75 SLOT(_pthread_mutex_init_calloc_cb, _pthread_mutex_init_calloc_cb_stub),
76 SLOT(spinlock, __libc_spinlock_stub),
77 SLOT(spinunlock, __libc_spinunlock_stub),
78 SLOT(kevent, __sys_kevent),
35
36#include <sys/types.h>
37#include "libc_private.h"
38
39#define SLOT(a, b) \
40 [INTERPOS_##a] = (interpos_func_t)b
41interpos_func_t __libc_interposing[INTERPOS_MAX] = {
42 SLOT(accept, __sys_accept),

--- 28 unchanged lines hidden (view full) ---

71 SLOT(tcdrain, __libc_tcdrain),
72 SLOT(wait4, __sys_wait4),
73 SLOT(write, __sys_write),
74 SLOT(writev, __sys_writev),
75 SLOT(_pthread_mutex_init_calloc_cb, _pthread_mutex_init_calloc_cb_stub),
76 SLOT(spinlock, __libc_spinlock_stub),
77 SLOT(spinunlock, __libc_spinunlock_stub),
78 SLOT(kevent, __sys_kevent),
79 SLOT(wait6, __sys_wait6),
80 SLOT(ppoll, __sys_ppoll),
79};
80#undef SLOT
81
82interpos_func_t *
83__libc_interposing_slot(int interposno)
84{
85
86 return (&__libc_interposing[interposno]);
87}
81};
82#undef SLOT
83
84interpos_func_t *
85__libc_interposing_slot(int interposno)
86{
87
88 return (&__libc_interposing[interposno]);
89}