Denis Vlasenko | 8023d7d | 2006-11-24 15:06:28 +0000 | [diff] [blame] | 1 | /* |
| 2 | * Utility routines. |
| 3 | * |
Denis Vlasenko | d18f52b | 2008-03-02 12:53:15 +0000 | [diff] [blame] | 4 | * Copyright (C) 2006 Denys Vlasenko |
Denis Vlasenko | 8023d7d | 2006-11-24 15:06:28 +0000 | [diff] [blame] | 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! */ |
Denis Vlasenko | 9579d87 | 2008-06-28 04:58:55 +0000 | [diff] [blame] | 10 | #include "platform.h" |
Denis Vlasenko | 2ea630f | 2006-12-10 02:52:19 +0000 | [diff] [blame] | 11 | #include <features.h> |
Denis Vlasenko | 8023d7d | 2006-11-24 15:06:28 +0000 | [diff] [blame] | 12 | #include <sys/sysmacros.h> |
| 13 | |
| 14 | #ifdef __GLIBC__ |
| 15 | /* At least glibc has horrendously large inline for this, so wrap it */ |
| 16 | /* uclibc people please check - do we need "&& !__UCLIBC__" above? */ |
Denis Vlasenko | 769d1e0 | 2007-01-22 23:04:27 +0000 | [diff] [blame] | 17 | |
| 18 | /* suppress gcc "no previous prototype" warning */ |
Denis Vlasenko | 9579d87 | 2008-06-28 04:58:55 +0000 | [diff] [blame] | 19 | unsigned long long FAST_FUNC bb_makedev(unsigned int major, unsigned int minor); |
| 20 | unsigned long long FAST_FUNC bb_makedev(unsigned int major, unsigned int minor) |
Denis Vlasenko | 8023d7d | 2006-11-24 15:06:28 +0000 | [diff] [blame] | 21 | { |
| 22 | return makedev(major, minor); |
| 23 | } |
| 24 | #endif |