031-fix_uclibc.patch (1137B)
1 --- a/configure.in 2 +++ b/configure.in 3 @@ -279,6 +279,9 @@ dnl ************************************ 4 dnl Checks for library functions 5 dnl *********************************************************************** 6 7 +dnl Check mkostemp (missing in uclibc) 8 +AC_CHECK_FUNC(mkostemp) 9 + 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 15 @@ -207,6 +207,9 @@ 16 /* Define to 1 if you have the `mkdir' function. */ 17 #undef HAVE_MKDIR 18 19 +/* Define to 1 if you have a working `mkostemp' function. */ 20 +#undef HAVE_MKOSTEMP 21 + 22 /* Define to 1 if you have a working `mmap' system call. */ 23 #undef HAVE_MMAP 24 25 --- a/backend/pieusb_buffer.c 26 +++ b/backend/pieusb_buffer.c 27 @@ -112,6 +112,11 @@ 28 #endif 29 #endif 30 31 +#ifndef HAVE_MKOSTEMP 32 +/* uclibc might not implement mkostemp GNU extension */ 33 +#define mkostemp(template, flags) mkstemp(template) 34 +#endif 35 + 36 static void buffer_update_read_index(struct Pieusb_Read_Buffer* buffer, int increment); 37 38 /* READER */