diff options
author | Jörg Frings-Fürst <debian@jff-webhosting.net> | 2017-05-24 21:03:56 +0200 |
---|---|---|
committer | Jörg Frings-Fürst <debian@jff-webhosting.net> | 2017-05-24 21:03:56 +0200 |
commit | 58912f68c2489bcee787599837447e0d64dfd61a (patch) | |
tree | dda50aadde35fe152da1a8d50769987ace0f1496 /backend/pieusb_buffer.c | |
parent | cfd27ef2ad8b005fd47ab41ef29b71d9e3d48201 (diff) |
New upstream version 1.0.27upstream/1.0.27
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; |