Changes for kernel and Busybox
[tomato.git] / release / src / router / busybox / libbb / makedev.c
blob06c4039a3119e40f04bb9072018a98717fdb7c5c
1 /*
2 * Utility routines.
4 * Copyright (C) 2006 Denys Vlasenko
6 * Licensed under GPLv2, see file LICENSE in this source tree.
7 */
9 /* We do not include libbb.h - #define makedev() is there! */
10 #include "platform.h"
12 /* Different Unixes want different headers for makedev */
13 #if defined(__FreeBSD__) || defined(__OpenBSD__) || defined(__NetBSD__) \
14 || defined(__APPLE__)
15 # include <sys/types.h>
16 #else
17 # include <features.h>
18 # include <sys/sysmacros.h>
19 #endif
21 #ifdef __GLIBC__
22 /* At least glibc has horrendously large inline for this, so wrap it. */
23 /* uclibc people please check - do we need "&& !__UCLIBC__" above? */
25 /* Suppress gcc "no previous prototype" warning */
26 unsigned long long FAST_FUNC bb_makedev(unsigned major, unsigned minor);
27 unsigned long long FAST_FUNC bb_makedev(unsigned major, unsigned minor)
29 return makedev(major, minor);
31 #endif