diff mbox

[ovs-dev,2/2] compiler: Don't require constructor names to be globally unique in MSVC.

Message ID 1455147802-27506-2-git-send-email-blp@ovn.org
State Accepted
Headers show

Commit Message

Ben Pfaff Feb. 10, 2016, 11:43 p.m. UTC
Signed-off-by: Ben Pfaff <blp@ovn.org>
---
 include/openvswitch/compiler.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Russell Bryant Feb. 11, 2016, 12:48 a.m. UTC | #1
On Wed, Feb 10, 2016 at 6:43 PM, Ben Pfaff <blp@ovn.org> wrote:

> Signed-off-by: Ben Pfaff <blp@ovn.org>
> ---
>  include/openvswitch/compiler.h | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/include/openvswitch/compiler.h
> b/include/openvswitch/compiler.h
> index f13f315..60c408b 100644
> --- a/include/openvswitch/compiler.h
> +++ b/include/openvswitch/compiler.h
> @@ -206,7 +206,7 @@
>  #pragma section(".CRT$XCU",read)
>  #define OVS_CONSTRUCTOR(f) \
>      static void __cdecl f(void); \
> -    __declspec(allocate(".CRT$XCU")) void (__cdecl*f##_)(void) = f; \
> +    __declspec(allocate(".CRT$XCU")) static void (__cdecl*f##_)(void) =
> f; \
>      static void __cdecl f(void)
>  #else
>  #define OVS_CONSTRUCTOR(f) \
>

Ah, I see...  I should have looked here to find the root cause of the
windows build error.  Thanks for pointing it out!

Acked-by: Russell Bryant <russell@ovn.org>
Ben Pfaff Feb. 11, 2016, 2:08 a.m. UTC | #2
On Wed, Feb 10, 2016 at 07:48:34PM -0500, Russell Bryant wrote:
> On Wed, Feb 10, 2016 at 6:43 PM, Ben Pfaff <blp@ovn.org> wrote:
> 
> > Signed-off-by: Ben Pfaff <blp@ovn.org>
> > ---
> >  include/openvswitch/compiler.h | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/include/openvswitch/compiler.h
> > b/include/openvswitch/compiler.h
> > index f13f315..60c408b 100644
> > --- a/include/openvswitch/compiler.h
> > +++ b/include/openvswitch/compiler.h
> > @@ -206,7 +206,7 @@
> >  #pragma section(".CRT$XCU",read)
> >  #define OVS_CONSTRUCTOR(f) \
> >      static void __cdecl f(void); \
> > -    __declspec(allocate(".CRT$XCU")) void (__cdecl*f##_)(void) = f; \
> > +    __declspec(allocate(".CRT$XCU")) static void (__cdecl*f##_)(void) =
> > f; \
> >      static void __cdecl f(void)
> >  #else
> >  #define OVS_CONSTRUCTOR(f) \
> >
> 
> Ah, I see...  I should have looked here to find the root cause of the
> windows build error.  Thanks for pointing it out!

You're welcome.

> Acked-by: Russell Bryant <russell@ovn.org>

Thanks, I applied both patches to master.
diff mbox

Patch

diff --git a/include/openvswitch/compiler.h b/include/openvswitch/compiler.h
index f13f315..60c408b 100644
--- a/include/openvswitch/compiler.h
+++ b/include/openvswitch/compiler.h
@@ -206,7 +206,7 @@ 
 #pragma section(".CRT$XCU",read)
 #define OVS_CONSTRUCTOR(f) \
     static void __cdecl f(void); \
-    __declspec(allocate(".CRT$XCU")) void (__cdecl*f##_)(void) = f; \
+    __declspec(allocate(".CRT$XCU")) static void (__cdecl*f##_)(void) = f; \
     static void __cdecl f(void)
 #else
 #define OVS_CONSTRUCTOR(f) \