nuttx-apps/testing/ltp/0002-Use-ifdef-instead-of-if-for-__linux__.patch
yanghuatao 1309990d6c ltp/makefile: nuttx on github download ltp code failed fix
Fix github download ltp code error:
Cloning into 'ltp'...
*** Please tell me who you are.
Run
  git config --global user.email "you@example.com"
  git config --global user.name "Your Name"
to set your account's default identity.
Omit --global to set the identity only in this repository.
fatal: unable to auto-detect email address (got 'root@33ba2a4a6fc5.(none)')

Signed-off-by: yanghuatao <yanghuatao@xiaomi.com>
2023-08-03 10:54:44 -07:00

26 lines
902 B
Diff

From 1482d59fc2f5ed935e8201704305684cf129fbae Mon Sep 17 00:00:00 2001
From: Brennan Ashton <bashton@brennanashton.com>
Date: Sun, 11 Apr 2021 00:12:06 -0700
Subject: [PATCH 2/2] Use #ifdef instead of #if for __linux__
---
.../conformance/interfaces/sem_timedwait/3-1.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/ltp/testcases/open_posix_testsuite/conformance/interfaces/sem_timedwait/3-1.c b/ltp/testcases/open_posix_testsuite/conformance/interfaces/sem_timedwait/3-1.c
index fb6f2e6cb..739fe86a5 100644
--- a/ltp/testcases/open_posix_testsuite/conformance/interfaces/sem_timedwait/3-1.c
+++ b/ltp/testcases/open_posix_testsuite/conformance/interfaces/sem_timedwait/3-1.c
@@ -15,7 +15,7 @@
#include <sys/stat.h>
#include <sys/types.h>
#include <fcntl.h>
-#if __linux__
+#ifdef __linux__
#include <features.h>
#endif
#include <semaphore.h>
--
2.30.2