1235647Sgleb/*-
2235649Sgleb * Copyright (c) 2011 Gleb Kurtsou <gleb@FreeBSD.org>
3235649Sgleb * All rights reserved.
4235647Sgleb *
5235647Sgleb * Redistribution and use in source and binary forms, with or without
6235647Sgleb * modification, are permitted provided that the following conditions
7235647Sgleb * are met:
8235647Sgleb * 1. Redistributions of source code must retain the above copyright
9235647Sgleb *    notice, this list of conditions and the following disclaimer.
10235647Sgleb * 2. Redistributions in binary form must reproduce the above copyright
11235647Sgleb *    notice, this list of conditions and the following disclaimer in the
12235647Sgleb *    documentation and/or other materials provided with the distribution.
13235647Sgleb *
14235649Sgleb * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
15235647Sgleb * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
16235647Sgleb * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
17235649Sgleb * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
18235647Sgleb * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
19235647Sgleb * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
20235647Sgleb * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
21235647Sgleb * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
22235647Sgleb * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
23235647Sgleb * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
24235647Sgleb * SUCH DAMAGE.
25235647Sgleb *
26235647Sgleb * $FreeBSD: releng/10.2/lib/libc/gen/dirfd.c 235649 2012-05-19 14:30:49Z gleb $
27235647Sgleb */
28235647Sgleb
29235647Sgleb#include <sys/cdefs.h>
30235647Sgleb__FBSDID("$FreeBSD: releng/10.2/lib/libc/gen/dirfd.c 235649 2012-05-19 14:30:49Z gleb $");
31235647Sgleb
32235647Sgleb#include "namespace.h"
33235647Sgleb#include <sys/param.h>
34235647Sgleb
35235647Sgleb#include <dirent.h>
36235647Sgleb#include "un-namespace.h"
37235647Sgleb
38235647Sgleb#include "gen-private.h"
39235647Sgleb
40235647Sglebint
41235647Sglebdirfd(DIR *dirp)
42235647Sgleb{
43235647Sgleb
44235647Sgleb	return (_dirfd(dirp));
45235647Sgleb}
46