diff options
author | Jörg Frings-Fürst <debian@jff-webhosting.net> | 2017-07-15 11:29:05 +0200 |
---|---|---|
committer | Jörg Frings-Fürst <debian@jff-webhosting.net> | 2017-07-15 11:29:05 +0200 |
commit | 324a8a71bb7d9e4f8bc49b6bc47efaf9fb58282e (patch) | |
tree | bd2d48a139bfbe869f4f49359b63097931a45e7b /backend/pieusb_buffer.c | |
parent | 2ca8a81bd0d99fe4d75c229d0e988d8ef710285f (diff) | |
parent | 1edb02101a9306fc711cd422ed507d18165b1691 (diff) |
Merge branch 'release/experimental/1.0.27-1_experimental1'experimental/1.0.27-1_experimental1
Diffstat (limited to 'backend/pieusb_buffer.c')
-rw-r--r-- | backend/pieusb_buffer.c | 11 |
1 files changed, 2 insertions, 9 deletions
diff --git a/backend/pieusb_buffer.c b/backend/pieusb_buffer.c index 53bd867..8c67a65 100644 --- a/backend/pieusb_buffer.c +++ b/backend/pieusb_buffer.c @@ -100,15 +100,8 @@ #include <stdio.h> #include <fcntl.h> #include <sys/mman.h> -#include <endian.h> -/* When creating the release backend, make complains about unresolved external - * le16toh, although it finds the include <endian.h> */ -#if __BYTE_ORDER == __LITTLE_ENDIAN - #define le16toh(x) (x) -#else - #define le16toh(x) __bswap_16 (x) -#endif +#include "byteorder.h" static void buffer_update_read_index(struct Pieusb_Read_Buffer* buffer, int increment); @@ -163,7 +156,7 @@ sanei_pieusb_buffer_create(struct Pieusb_Read_Buffer* buffer, SANE_Int width, SA snprintf(buffer->buffer_name, L_tmpnam, "/tmp/sane.XXXXXX"); if (buffer->data_file != 0) /* might still be open from previous invocation */ close(buffer->data_file); - buffer->data_file = mkostemp(buffer->buffer_name, O_RDWR | O_CREAT | O_EXCL | O_TRUNC); + buffer->data_file = mkstemp(buffer->buffer_name); if (buffer->data_file == -1) { buffer->data_file = 0; buffer->data = NULL; |