1*60d31138Szrj /*
2*60d31138Szrj * Copyright (c) 2019 The DragonFly Project. All rights reserved.
3*60d31138Szrj *
4*60d31138Szrj * Redistribution and use in source and binary forms, with or without
5*60d31138Szrj * modification, are permitted provided that the following conditions
6*60d31138Szrj * are met:
7*60d31138Szrj * 1. Redistributions of source code must retain the above copyright
8*60d31138Szrj * notice, this list of conditions and the following disclaimer.
9*60d31138Szrj * 2. Redistributions in binary form must reproduce the above copyright
10*60d31138Szrj * notice, this list of conditions and the following disclaimer in the
11*60d31138Szrj * documentation and/or other materials provided with the distribution.
12*60d31138Szrj *
13*60d31138Szrj * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
14*60d31138Szrj * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
15*60d31138Szrj * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
16*60d31138Szrj * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
17*60d31138Szrj * COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
18*60d31138Szrj * INCIDENTAL, SPECIAL, EXEMPLARY OR CONSEQUENTIAL DAMAGES (INCLUDING,
19*60d31138Szrj * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
20*60d31138Szrj * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
21*60d31138Szrj * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
22*60d31138Szrj * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
23*60d31138Szrj * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
24*60d31138Szrj * SUCH DAMAGE.
25*60d31138Szrj */
26*60d31138Szrj
27*60d31138Szrj #include <sys/errno.h>
28*60d31138Szrj
29*60d31138Szrj /*
30*60d31138Szrj * This function to fetch errno is provided for language binding only.
31*60d31138Szrj */
32*60d31138Szrj int *
__errno_location(void)33*60d31138Szrj __errno_location(void)
34*60d31138Szrj {
35*60d31138Szrj return (__error());
36*60d31138Szrj }
37