Browse Source

Remove timersub redefine.

git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@2274 fd59a12c-fef9-0310-b244-a6a79926bd2f
Steven Dake 16 years ago
parent
commit
1402dac1ee
2 changed files with 4 additions and 0 deletions
  1. 2 0
      services/pload.c
  2. 2 0
      test/logsysbench.c

+ 2 - 0
services/pload.c

@@ -328,6 +328,7 @@ static void message_handler_req_exec_pload_start (
 	start_mcasting ();
 	start_mcasting ();
 }
 }
 
 
+#ifndef timersub
 # define timersub(a, b, result)                                               \
 # define timersub(a, b, result)                                               \
   do {                                                                        \
   do {                                                                        \
     (result)->tv_sec = (a)->tv_sec - (b)->tv_sec;                             \
     (result)->tv_sec = (a)->tv_sec - (b)->tv_sec;                             \
@@ -337,6 +338,7 @@ static void message_handler_req_exec_pload_start (
       (result)->tv_usec += 1000000;                                           \
       (result)->tv_usec += 1000000;                                           \
     }                                                                         \
     }                                                                         \
   } while (0)
   } while (0)
+#endif
 
 
 struct timeval tv1;
 struct timeval tv1;
 struct timeval tv2;
 struct timeval tv2;

+ 2 - 0
test/logsysbench.c

@@ -57,6 +57,7 @@ LOGSYS_DECLARE_SYSTEM ("logtest_rec",
 
 
 static struct timeval tv1, tv2, tv_elapsed;
 static struct timeval tv1, tv2, tv_elapsed;
 
 
+#ifndef timersub
 #define timersub(a, b, result)					\
 #define timersub(a, b, result)					\
 do {								\
 do {								\
 	(result)->tv_sec = (a)->tv_sec - (b)->tv_sec;		\
 	(result)->tv_sec = (a)->tv_sec - (b)->tv_sec;		\
@@ -66,6 +67,7 @@ do {								\
 		(result)->tv_usec += 1000000;			\
 		(result)->tv_usec += 1000000;			\
 	}							\
 	}							\
 } while (0)
 } while (0)
+#endif
 
 
 static void bm_start (void)
 static void bm_start (void)
 {
 {