public inbox for ltp@lists.linux.it
 help / color / mirror / Atom feed
* [LTP] [PATCH 1/2] getcontext01: fix build using uClibc C runtime
@ 2012-01-18 14:36 Carmelo AMOROSO
  2012-01-18 14:36 ` [LTP] [PATCH 2/2] profile01: fix build using uClibc runtime Carmelo AMOROSO
                   ` (2 more replies)
  0 siblings, 3 replies; 15+ messages in thread
From: Carmelo AMOROSO @ 2012-01-18 14:36 UTC (permalink / raw)
  To: ltp-list

Fix a build error when __UCLIBC__ is defined (see log below)
by moving "test.h", "unistd.h" and TCID on top of file as required
by 'tst_brkm' function.

---
getcontext01.c: In function ‘main’:
getcontext01.c:103:2: warning: implicit declaration of function ‘tst_brkm’
getcontext01.c:103:11: error: ‘TCONF’ undeclared (first use in this function)
getcontext01.c:103:11: note: each undeclared identifier is reported only once for each function it appears in
getcontext01.c:103:18: error: ‘NULL’ undeclared (first use in this function)
getcontext01.c:104:1: warning: control reaches end of non-void function
---

Signed-off-by: Francesco Rundo <francesco.rundo@st.com>
Signed-off-by: Carmelo Amoroso <carmelo.amoroso@st.com>
---
 .../kernel/syscalls/getcontext/getcontext01.c      |    9 +++++----
 1 files changed, 5 insertions(+), 4 deletions(-)

diff --git a/testcases/kernel/syscalls/getcontext/getcontext01.c b/testcases/kernel/syscalls/getcontext/getcontext01.c
index 7cadc67..8f6e919 100644
--- a/testcases/kernel/syscalls/getcontext/getcontext01.c
+++ b/testcases/kernel/syscalls/getcontext/getcontext01.c
@@ -34,20 +34,21 @@
  **********************************************************/
 
 #include <features.h>
+#include <unistd.h>
+#include "test.h"
+char *TCID = "getcontext01";	/* Test program identifier.    */
+
 #if !defined(__UCLIBC__)
 
 #include <stdio.h>
-#include <unistd.h>
 #include <errno.h>
 #include <ucontext.h>
 
-#include "test.h"
 #include "usctest.h"
 
 void setup();
 void cleanup();
 
-char *TCID = "getcontext01";	/* Test program identifier.    */
 int TST_TOTAL = 1;		/* Total number of test cases. */
 
 int exp_enos[] = { 0 };		/* must be a 0 terminated list */
@@ -102,4 +103,4 @@ int main()
 {
 	tst_brkm(TCONF, NULL, "system doesn't have getcontext support");
 }
-#endif
\ No newline at end of file
+#endif
-- 
1.7.4.4


------------------------------------------------------------------------------
Keep Your Developer Skills Current with LearnDevNow!
The most comprehensive online learning library for Microsoft developers
is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3,
Metro Style Apps, more. Free future releases when you subscribe now!
http://p.sf.net/sfu/learndevnow-d2d
_______________________________________________
Ltp-list mailing list
Ltp-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ltp-list

^ permalink raw reply related	[flat|nested] 15+ messages in thread

end of thread, other threads:[~2012-01-25 13:42 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-01-18 14:36 [LTP] [PATCH 1/2] getcontext01: fix build using uClibc C runtime Carmelo AMOROSO
2012-01-18 14:36 ` [LTP] [PATCH 2/2] profile01: fix build using uClibc runtime Carmelo AMOROSO
2012-01-18 15:16   ` Mike Frysinger
2012-01-18 15:44   ` [LTP] [PATCH 2/2 V2] " Carmelo AMOROSO
2012-01-18 16:46     ` Mike Frysinger
2012-01-18 15:16 ` [LTP] [PATCH 1/2] getcontext01: fix build using uClibc C runtime Mike Frysinger
2012-01-18 15:31   ` Carmelo AMOROSO
2012-01-18 15:44 ` [LTP] [PATCH 1/2 V2] " Carmelo AMOROSO
2012-01-18 16:46   ` Mike Frysinger
2012-01-20 13:40   ` Cyril Hrubis
2012-01-23 10:01     ` [LTP] [PATCH 1/2 V3] " Carmelo AMOROSO
2012-01-23 10:01       ` [LTP] [PATCH 2/2 V3] profile01: fix build using uClibc runtime Carmelo AMOROSO
2012-01-24  1:09         ` Mike Frysinger
2012-01-24  1:09       ` [LTP] [PATCH 1/2 V3] getcontext01: fix build using uClibc C runtime Mike Frysinger
2012-01-25 13:55       ` Cyril Hrubis

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox