makedev.c 699 B

123456789101112131415161718192021222324
  1. /*
  2. * Utility routines.
  3. *
  4. * Copyright (C) 2006 Denys Vlasenko
  5. *
  6. * Licensed under GPL version 2, see file LICENSE in this tarball for details.
  7. */
  8. /* We do not include libbb.h - #define makedev() is there! */
  9. #include "platform.h"
  10. #include <features.h>
  11. #include <sys/sysmacros.h>
  12. #ifdef __GLIBC__
  13. /* At least glibc has horrendously large inline for this, so wrap it */
  14. /* uclibc people please check - do we need "&& !__UCLIBC__" above? */
  15. /* suppress gcc "no previous prototype" warning */
  16. unsigned long long FAST_FUNC bb_makedev(unsigned int major, unsigned int minor);
  17. unsigned long long FAST_FUNC bb_makedev(unsigned int major, unsigned int minor)
  18. {
  19. return makedev(major, minor);
  20. }
  21. #endif