app/test: fix build without librte_cmdline
[dpdk.git] / app / test / test_timer.c
index 026b576..38c1218 100644 (file)
@@ -1,7 +1,7 @@
 /*-
  *   BSD LICENSE
  * 
- *   Copyright(c) 2010-2013 Intel Corporation. All rights reserved.
+ *   Copyright(c) 2010-2014 Intel Corporation. All rights reserved.
  *   All rights reserved.
  * 
  *   Redistribution and use in source and binary forms, with or without
@@ -31,6 +31,9 @@
  *   OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
 
+#include "test.h"
+
+#ifdef RTE_LIBRTE_TIMER
 /*
  * Timer
  * =====
 #include <sys/queue.h>
 #include <math.h>
 
-#include <cmdline_parse.h>
-
 #include <rte_common.h>
 #include <rte_log.h>
 #include <rte_memory.h>
 #include <rte_random.h>
 #include <rte_malloc.h>
 
-#include "test.h"
 
 #define TEST_DURATION_S 20 /* in seconds */
 #define NB_TIMER 4
@@ -519,3 +519,13 @@ test_timer(void)
 
        return 0;
 }
+
+#else
+
+int
+test_timer(void)
+{
+       return 0;
+}
+
+#endif