You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by xi...@apache.org on 2021/04/11 06:50:40 UTC

[incubator-nuttx] branch master updated: Add define for _POSIX_TIMEOUTS

This is an automated email from the ASF dual-hosted git repository.

xiaoxiang pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-nuttx.git


The following commit(s) were added to refs/heads/master by this push:
     new e945f2d  Add define for _POSIX_TIMEOUTS
e945f2d is described below

commit e945f2da866803c06316894b922aff64768cc39a
Author: Brennan Ashton <ba...@brennanashton.com>
AuthorDate: Sat Apr 10 22:49:34 2021 -0700

    Add define for _POSIX_TIMEOUTS
---
 include/unistd.h | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/include/unistd.h b/include/unistd.h
index b5a302a..62e505a 100644
--- a/include/unistd.h
+++ b/include/unistd.h
@@ -55,7 +55,12 @@
 #undef  _POSIX_MAPPED_FILES
 #undef  _POSIX_SHARED_MEMORY_OBJECTS
 #define _POSIX_PRIORITY_SCHEDULING 1
-#define _POSIX_TIMERS 1
+#ifndef CONFIG_DISABLE_POSIX_TIMERS
+#  define _POSIX_TIMERS 1
+#endif
+#if !defined(CONFIG_DISABLE_MQUEUE) && !defined(CONFIG_DISABLE_PTHREAD)
+#  define _POSIX_TIMEOUTS 1
+#endif
 #undef  _POSIX_MEMLOCK
 #undef  _POSIX_MEMLOCK_RANGE
 #undef  _POSIX_FSYNC