svn add makedev.c. Forgot as usual... :(
authorDenis Vlasenko <vda.linux@googlemail.com>
Fri, 24 Nov 2006 15:06:28 +0000 (15:06 -0000)
committerDenis Vlasenko <vda.linux@googlemail.com>
Fri, 24 Nov 2006 15:06:28 +0000 (15:06 -0000)
libbb/makedev.c [new file with mode: 0644]

diff --git a/libbb/makedev.c b/libbb/makedev.c
new file mode 100644 (file)
index 0000000..09ed728
--- /dev/null
@@ -0,0 +1,19 @@
+/*
+ * Utility routines.
+ *
+ * Copyright (C) 2006 Denis Vlasenko
+ *
+ * Licensed under GPL version 2, see file LICENSE in this tarball for details.
+ */
+
+/* We do not include libbb.h - #define makedev() is there! */
+#include <sys/sysmacros.h>
+
+#ifdef __GLIBC__
+/* At least glibc has horrendously large inline for this, so wrap it */
+/* uclibc people please check - do we need "&& !__UCLIBC__" above? */
+unsigned long long bb_makedev(unsigned int major, unsigned int minor)
+{
+       return makedev(major, minor);
+}
+#endif