aboutsummaryrefslogtreecommitdiff
path: root/libbb/makedev.c
diff options
context:
space:
mode:
Diffstat (limited to 'libbb/makedev.c')
-rw-r--r--libbb/makedev.c20
1 files changed, 20 insertions, 0 deletions
diff --git a/libbb/makedev.c b/libbb/makedev.c
new file mode 100644
index 000000000..4903e4783
--- /dev/null
+++ b/libbb/makedev.c
@@ -0,0 +1,20 @@
1/*
2 * Utility routines.
3 *
4 * Copyright (C) 2006 Denis Vlasenko
5 *
6 * Licensed under GPL version 2, see file LICENSE in this tarball for details.
7 */
8
9/* We do not include libbb.h - #define makedev() is there! */
10#include <features.h>
11#include <sys/sysmacros.h>
12
13#ifdef __GLIBC__
14/* At least glibc has horrendously large inline for this, so wrap it */
15/* uclibc people please check - do we need "&& !__UCLIBC__" above? */
16unsigned long long bb_makedev(unsigned int major, unsigned int minor)
17{
18 return makedev(major, minor);
19}
20#endif