Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 0 additions & 8 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -461,14 +461,6 @@ AC_DEFINE_UNQUOTED([DBUS_CLIENT_GROUP], ["${DBUS_CLIENT_GROUP}"], [DBus client g
AC_MSG_RESULT(${DBUS_CLIENT_GROUP})
AC_SUBST([DBUS_CLIENT_GROUP])

dnl Check for clock_gettime. Some systems put it into -lc, while
dnl others use -lrt. Try the first and fallback to the latter.
RT_LIB=
AC_CHECK_FUNC([clock_gettime], [:],
[AC_CHECK_LIB([rt], [clock_gettime], [RT_LIB="-lrt"],
[AC_MSG_ERROR([Your system lacks clock_gettime])])])
AC_SUBST(RT_LIB)

PKG_CHECK_MODULES([LIBEVENT], [libevent >= 2.0])

have_dbus=false
Expand Down
12 changes: 2 additions & 10 deletions src/util.c
Original file line number Diff line number Diff line change
Expand Up @@ -286,12 +286,7 @@ int rtc_close(struct rtc_handle *handle)

int file_write(int fd, void *buf, size_t sz)
{
struct iovec iov[1];
ssize_t ret;
iov[0].iov_base = buf;
iov[0].iov_len = sz;
ret = IGNORE_EINTR (pwritev (fd, iov, 1, 0));
if (ret != sz)
if (IGNORE_EINTR(pwrite(fd, buf, sz, 0)) != sz)
{
return -1;
}
Expand Down Expand Up @@ -329,10 +324,7 @@ int file_close(int fd)

int file_read(int fd, void *buf, size_t sz)
{
struct iovec iov[1];
iov[0].iov_base = buf;
iov[0].iov_len = sz;
if (preadv (fd, iov, 1, 0) != sz)
if (pread(fd, buf, sz, 0) != sz)
{
/* Returns -1 on read failure */
return -1;
Expand Down