string.h 538 B

12345678910111213141516171819202122
  1. #ifndef _TOOLS_LINUX_STRING_H_
  2. #define _TOOLS_LINUX_STRING_H_
  3. #include <linux/types.h> /* for size_t */
  4. void *memdup(const void *src, size_t len);
  5. int strtobool(const char *s, bool *res);
  6. /*
  7. * glibc based builds needs the extern while uClibc doesn't.
  8. * However uClibc headers also define __GLIBC__ hence the hack below
  9. */
  10. #if defined(__GLIBC__) && !defined(__UCLIBC__)
  11. extern size_t strlcpy(char *dest, const char *src, size_t size);
  12. #endif
  13. char *str_error_r(int errnum, char *buf, size_t buflen);
  14. #endif /* _LINUX_STRING_H_ */