From bc4eae88f9bd591ec628f79f3cdd93b90af87ae3 Mon Sep 17 00:00:00 2001 From: Will Hedgecock Date: Wed, 16 Feb 2022 09:59:47 -0600 Subject: [PATCH] Do not attempt to use pthread_condattr_setclock on Android --- src/main/c/Posix/PosixHelperFunctions.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/c/Posix/PosixHelperFunctions.c b/src/main/c/Posix/PosixHelperFunctions.c index 7fa6900..69b3cd6 100644 --- a/src/main/c/Posix/PosixHelperFunctions.c +++ b/src/main/c/Posix/PosixHelperFunctions.c @@ -2,7 +2,7 @@ * PosixHelperFunctions.c * * Created on: Mar 10, 2015 - * Last Updated on: Jan 28, 2022 + * Last Updated on: Feb 16, 2022 * Author: Will Hedgecock * * Copyright (C) 2012-2022 Fazecast, Inc. @@ -63,7 +63,7 @@ serialPort* pushBack(serialPortVector* vector, const char* key, const char* frie pthread_mutex_init(&port->eventMutex, NULL); pthread_condattr_t conditionVariableAttributes; pthread_condattr_init(&conditionVariableAttributes); -#if !defined(__APPLE__) && !defined(__OpenBSD__) +#if !defined(__APPLE__) && !defined(__OpenBSD__) && !defined(__ANDROID__) pthread_condattr_setclock(&conditionVariableAttributes, CLOCK_MONOTONIC); #endif pthread_cond_init(&port->eventReceived, &conditionVariableAttributes);