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