Traffic Server
  1. Traffic Server
  2. TS-956

the "ON" defined in TS conflict with zlib-1.2.5.1

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Critical Critical
    • Resolution: Fixed
    • Affects Version/s: 3.1.1
    • Fix Version/s: 3.1.1
    • Component/s: Cleanup, Portability
    • Labels:
      None
    • Environment:

      gcc 4.6.1, zlib 1.2.5.1, ts trunk

      Description

      when building trunk with my fresh updated gentoo, TS fail at:

      x86_64-pc-linux-gnu-g++ -DHAVE_CONFIG_H  -I. -I../../lib/ts  -I../../iocore/eventsystem -I../../iocore/net -I../../iocore/aio -I../../iocore/hostdb -I../../iocore/cache -I../../iocore/cluster -I../../iocore/utils -I../../iocore/dns -I../../lib -I../../lib/records -I../../proxy -I../../proxy/hdrs -I../../proxy/http -I../../proxy/http/remap -I../../mgmt -I../../mgmt/preparse -I../../mgmt/utils -D_LARGEFILE64_SOURCE=1 -D_COMPILE64BIT_SOURCE=1 -D_GNU_SOURCE -D_REENTRANT -Dlinux  -pipe -g -ggdb3 -fno-strict-aliasing -Wall -Werror -O3 -feliminate-unused-debug-symbols -Wno-invalid-offsetof -MT Inline.o -MD -MP -MF .deps/Inline.Tpo -c -o Inline.o Inline.cc
      In file included from RamCacheCLFUS.cc:30:0:
      /usr/include/zlib.h:1283:32: error: invalid conversion from 'char*' to 'int' [-fpermissive]
      /usr/include/zlib.h:1283:34: error: expected ',' or ';' before '(' token
      mv -f .deps/CacheHttp.Tpo .deps/CacheHttp.Po
      x86_64-pc-linux-gnu-g++ -DHAVE_CONFIG_H  -I. -I../../lib/ts  -I../../iocore/eventsystem -I../../iocore/net -I../../iocore/aio -I../../iocore/hostdb -I../../iocore/cache -I../../iocore/cluster -I../../iocore/utils -I../../iocore/dns -I../../lib -I../../lib/records -I../../proxy -I../../proxy/hdrs -I../../proxy/http -I../../proxy/http/remap -I../../mgmt -I../../mgmt/preparse -I../../mgmt/utils -D_LARGEFILE64_SOURCE=1 -D_COMPILE64BIT_SOURCE=1 -D_GNU_SOURCE -D_REENTRANT -Dlinux  -pipe -g -ggdb3 -fno-strict-aliasing -Wall -Werror -O3 -feliminate-unused-debug-symbols -Wno-invalid-offsetof -MT CacheTest.o -MD -MP -MF .deps/CacheTest.Tpo -c -o CacheTest.o CacheTest.cc
      make[2]: *** [RamCacheCLFUS.o] Error 1
      make[2]: *** Waiting for unfinished jobs....
      
      1. TS-956.patch
        8 kB
        Zhao Yongming

        Activity

        Leif Hedstrom made changes -
        Status Resolved [ 5 ] Closed [ 6 ]
        Zhao Yongming made changes -
        Status Patch Available [ 10002 ] Resolved [ 5 ]
        Resolution Fixed [ 1 ]
        Hide
        Leif Hedstrom added a comment -

        Since this was committed, can we close this bug?

        Show
        Leif Hedstrom added a comment - Since this was committed, can we close this bug?
        Zhao Yongming made changes -
        Status Open [ 1 ] Patch Available [ 10002 ]
        Zhao Yongming made changes -
        Field Original Value New Value
        Attachment TS-956.patch [ 12494773 ]
        Hide
        Zhao Yongming added a comment -

        zlib 1.2.5.1 start to use the micro ON, which is conflict with TS, from what I can tell, this is just a optval for setsockopt(), it is safe to change without any problem, and here is the patch

        Show
        Zhao Yongming added a comment - zlib 1.2.5.1 start to use the micro ON, which is conflict with TS, from what I can tell, this is just a optval for setsockopt(), it is safe to change without any problem, and here is the patch
        Hide
        Zhao Yongming added a comment - - edited

        in TS:

        #define ON ((char*)&on)
        int on = 1;
        

        in zlib:

        #ifndef ON /* function prototypes for stdarg */
        #  if defined(STDC) || defined(Z_HAVE_STDARG_H)
        #    define ON(args)  args
        #  else
        #    define ON(args)  ()
        #  endif
        #endif
        

        ON maybe defined on the other places, need to figure out

        Show
        Zhao Yongming added a comment - - edited in TS: #define ON (( char *)&on) int on = 1; in zlib: #ifndef ON /* function prototypes for stdarg */ # if defined(STDC) || defined(Z_HAVE_STDARG_H) # define ON(args) args # else # define ON(args) () # endif #endif ON maybe defined on the other places, need to figure out
        Zhao Yongming created issue -

          People

          • Assignee:
            Zhao Yongming
            Reporter:
            Zhao Yongming
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development