From a644bae6eec521119252221d4aa989168eccc22b Mon Sep 17 00:00:00 2001 From: Justin Pettit Date: Sat, 31 Jul 2010 17:09:31 -0700 Subject: [PATCH] datapath: Clean-up previous undefined symbol commit The previous commit still had some issues with the "set_normalized_timespec" symbol being undefined. Here we just replace it. We can search for a more elegant solution later if necessary. --- datapath/linux-2.6/.gitignore | 1 + datapath/linux-2.6/Modules.mk | 4 ++-- .../compat-2.6/{include/linux/time.h => time.c} | 11 ++--------- 3 files changed, 5 insertions(+), 11 deletions(-) rename datapath/linux-2.6/compat-2.6/{include/linux/time.h => time.c} (76%) diff --git a/datapath/linux-2.6/.gitignore b/datapath/linux-2.6/.gitignore index 4b5658b2..bd99f240 100644 --- a/datapath/linux-2.6/.gitignore +++ b/datapath/linux-2.6/.gitignore @@ -25,6 +25,7 @@ /random32.c /skbuff-openvswitch.c /table.c +/time.c /tmp /veth.c /vport-generic.c diff --git a/datapath/linux-2.6/Modules.mk b/datapath/linux-2.6/Modules.mk index b6cb3e92..7f4cae6e 100644 --- a/datapath/linux-2.6/Modules.mk +++ b/datapath/linux-2.6/Modules.mk @@ -5,7 +5,8 @@ openvswitch_sources += \ linux-2.6/compat-2.6/ip_output-openvswitch.c \ linux-2.6/compat-2.6/kmemdup.c \ linux-2.6/compat-2.6/random32.c \ - linux-2.6/compat-2.6/skbuff-openvswitch.c + linux-2.6/compat-2.6/skbuff-openvswitch.c \ + linux-2.6/compat-2.6/time.c openvswitch_headers += \ linux-2.6/compat-2.6/compat26.h \ linux-2.6/compat-2.6/include/asm-generic/bug.h \ @@ -38,7 +39,6 @@ openvswitch_headers += \ linux-2.6/compat-2.6/include/linux/slab.h \ linux-2.6/compat-2.6/include/linux/stddef.h \ linux-2.6/compat-2.6/include/linux/tcp.h \ - linux-2.6/compat-2.6/include/linux/time.h \ linux-2.6/compat-2.6/include/linux/timer.h \ linux-2.6/compat-2.6/include/linux/types.h \ linux-2.6/compat-2.6/include/linux/udp.h \ diff --git a/datapath/linux-2.6/compat-2.6/include/linux/time.h b/datapath/linux-2.6/compat-2.6/time.c similarity index 76% rename from datapath/linux-2.6/compat-2.6/include/linux/time.h rename to datapath/linux-2.6/compat-2.6/time.c index fa325fae..b07ee267 100644 --- a/datapath/linux-2.6/compat-2.6/include/linux/time.h +++ b/datapath/linux-2.6/compat-2.6/time.c @@ -1,7 +1,4 @@ -#ifndef __LINUX_TIME_WRAPPER_H -#define __LINUX_TIME_WRAPPER_H 1 - -#include_next +#include #include @@ -9,8 +6,6 @@ /* "set_normalized_timespec" is defined but not exported in kernels * before 2.6.26. */ -#define set_normalized_timespec(ts, sec, nsec) \ - rpl_set_normalized_timespec(ts, sec, nsec) /** * set_normalized_timespec - set timespec sec and nsec parts and normalize @@ -26,7 +21,7 @@ * 0 <= tv_nsec < NSEC_PER_SEC * For negative values only the tv_sec field is negative ! */ -static inline void rpl_set_normalized_timespec(struct timespec *ts, +void set_normalized_timespec(struct timespec *ts, time_t sec, long nsec) { while (nsec >= NSEC_PER_SEC) { @@ -42,5 +37,3 @@ static inline void rpl_set_normalized_timespec(struct timespec *ts, } #endif /* linux kernel < 2.6.26 */ - -#endif -- 2.30.2