aboutsummaryrefslogtreecommitdiffstats
path: root/Compat.c
diff options
context:
space:
mode:
authorDaniel Lange <DLange@git.local>2021-09-21 08:35:20 +0200
committerDaniel Lange <DLange@git.local>2021-09-21 08:35:20 +0200
commita2b6942d15d220bb0518003d4f818a922d88e9f9 (patch)
tree7f60a44dec34af24da75b8d5b68c88eca94b9f6a /Compat.c
parent37d8824862a2f6b9375022e1c45ba4548162650f (diff)
parent69f439eff387a6ecb52734e400b297a3c85f2285 (diff)
downloaddebian_htop-a2b6942d15d220bb0518003d4f818a922d88e9f9.tar.gz
debian_htop-a2b6942d15d220bb0518003d4f818a922d88e9f9.tar.bz2
debian_htop-a2b6942d15d220bb0518003d4f818a922d88e9f9.zip
Update upstream source from tag 'upstream/3.1.0'
Update to upstream version '3.1.0' with Debian dir d4ecdd99a38d7105de46689cebcb051bf0046a76
Diffstat (limited to 'Compat.c')
-rw-r--r--Compat.c36
1 files changed, 1 insertions, 35 deletions
diff --git a/Compat.c b/Compat.c
index 55be1b1..1077c08 100644
--- a/Compat.c
+++ b/Compat.c
@@ -11,18 +11,12 @@ in the source distribution for its full text.
#include <errno.h>
#include <fcntl.h> // IWYU pragma: keep
-#include <time.h>
#include <unistd.h>
#include <sys/stat.h>
#include <sys/types.h> // IWYU pragma: keep
#include "XUtils.h" // IWYU pragma: keep
-#ifdef HAVE_HOST_GET_CLOCK_SERVICE
-#include <mach/clock.h>
-#include <mach/mach.h>
-#endif
-
int Compat_faccessat(int dirfd,
const char* pathname,
@@ -43,7 +37,7 @@ int Compat_faccessat(int dirfd,
#endif
// Error out on unsupported configurations
- if (dirfd != AT_FDCWD || mode != F_OK) {
+ if (dirfd != (int)AT_FDCWD || mode != F_OK) {
errno = EINVAL;
return -1;
}
@@ -123,31 +117,3 @@ ssize_t Compat_readlinkat(int dirfd,
#endif
}
-
-int Compat_clock_monotonic_gettime(struct timespec *tp) {
-
-#if defined(HAVE_CLOCK_GETTIME)
-
- return clock_gettime(CLOCK_MONOTONIC, tp);
-
-#elif defined(HAVE_HOST_GET_CLOCK_SERVICE)
-
- clock_serv_t cclock;
- mach_timespec_t mts;
-
- host_get_clock_service(mach_host_self(), SYSTEM_CLOCK, &cclock);
- clock_get_time(cclock, &mts);
- mach_port_deallocate(mach_task_self(), cclock);
-
- tp->tv_sec = mts.tv_sec;
- tp->tv_nsec = mts.tv_nsec;
-
- return 0;
-
-#else
-
-#error No Compat_clock_monotonic_gettime() implementation!
-
-#endif
-
-}

© 2014-2024 Faster IT GmbH | imprint | privacy policy