Uploaded image for project: 'Qpid Proton'
  1. Qpid Proton
  2. PROTON-587

Proton 0.7 fails to compile with Visual Studio 2008

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • proton-0.7
    • proton-0.8
    • proton-c
    • None
    • Visual Studio 2008 x86 (32-bit) debug or relwithdebinfo.
      Note: VS2008 x64 (64-bit) works fine; VS2010 x86,x64 work fine.

    Description

      Project recv.c fails to compile with size_t undefined.

      6>------ Build started: Project: recv, Configuration: Debug Win32 ------
      6>Compiling...
      6>recv.c
      6>P:\qpid-proton-0.7\proton-c\include\proton/types.h(60) : error C2016: C requires that a struct or union has at least one member
      6>P:\qpid-proton-0.7\proton-c\include\proton/types.h(60) : error C2061: syntax error : identifier 'size_t'
      6>P:\qpid-proton-0.7\proton-c\include\proton/types.h(62) : error C2059: syntax error : '}'
      ...
      

      The issue if fixed easy enough with the inclusion of stddef.h or stdlib.h in types.h

      diff --git a/proton-c/include/proton/types.h b/proton-c/include/proton/types.h
      index 4182f25..d26d6a2 100644
      --- a/proton-c/include/proton/types.h
      +++ b/proton-c/include/proton/types.h
      @@ -23,6 +23,7 @@
        */
      
       #include <proton/import_export.h>
      +#include <stddef.h>
       #include <sys/types.h>
       #include <proton/type_compat.h>
      

      Apologies for not catching this sooner but I've been using VS2010 almost exclusively of late. The fix looks harmless enough but I'm wondering if anyone has an reason to select stddef over stdlib or if there's a better place to have the #include.

      Attachments

        Activity

          People

            astitcher Andrew Stitcher
            chug Charles E. Rolke
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: