1
0

031-fix_uclibc.patch 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738
  1. --- a/configure.in
  2. +++ b/configure.in
  3. @@ -279,6 +279,9 @@ dnl ************************************
  4. dnl Checks for library functions
  5. dnl ***********************************************************************
  6. +dnl Check mkostemp (missing in uclibc)
  7. +AC_CHECK_FUNC(mkostemp)
  8. +
  9. dnl Define SOCKET_LIB, NSL_LIB, BIND_LIB, and RESOLV_LIB when required
  10. dnl for functions we use.
  11. AC_CHECK_FUNC(gethostbyaddr,, [AC_CHECK_LIB(bind, gethostbyaddr, BIND_LIB="-lbind")])
  12. --- a/include/sane/config.h.in
  13. +++ b/include/sane/config.h.in
  14. @@ -207,6 +207,9 @@
  15. /* Define to 1 if you have the `mkdir' function. */
  16. #undef HAVE_MKDIR
  17. +/* Define to 1 if you have a working `mkostemp' function. */
  18. +#undef HAVE_MKOSTEMP
  19. +
  20. /* Define to 1 if you have a working `mmap' system call. */
  21. #undef HAVE_MMAP
  22. --- a/backend/pieusb_buffer.c
  23. +++ b/backend/pieusb_buffer.c
  24. @@ -112,6 +112,11 @@
  25. #endif
  26. #endif
  27. +#ifndef HAVE_MKOSTEMP
  28. +/* uclibc might not implement mkostemp GNU extension */
  29. +#define mkostemp(template, flags) mkstemp(template)
  30. +#endif
  31. +
  32. static void buffer_update_read_index(struct Pieusb_Read_Buffer* buffer, int increment);
  33. /* READER */