makedev.c 657 B

1234567891011121314151617181920212223
  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 <features.h>
  10. #include <sys/sysmacros.h>
  11. #ifdef __GLIBC__
  12. /* At least glibc has horrendously large inline for this, so wrap it */
  13. /* uclibc people please check - do we need "&& !__UCLIBC__" above? */
  14. /* suppress gcc "no previous prototype" warning */
  15. unsigned long long bb_makedev(unsigned int major, unsigned int minor);
  16. unsigned long long bb_makedev(unsigned int major, unsigned int minor)
  17. {
  18. return makedev(major, minor);
  19. }
  20. #endif