Skip to content

Librdkafka does not compile on OSX 10.7.5 #19

@drdee

Description

@drdee

Hey Magnus,

I am trying to compile Librdkafka on OSX with the following platform env:

Apple LLVM version 4.2 (clang-425.0.28) (based on LLVM 3.2svn)
Target: x86_64-apple-darwin11.4.2
Thread model: posix

A couple of issues showed up:

  1. the -rdynamic switch is not supported on OSX
  2. byteswap.h is not available on OSX, that can be fixed using the following:

if defined(APPLE)

include <libkern/OSByteOrder.h>

define le32toh OSSwapLittleToHostInt32

define htole32 OSSwapHostToLittleInt32

define bswap_32 OSSwapInt32

else

#include <byteswap.h>

endif

  1. The TIMEVAL_TO_TIMESPEC from rdtime.h can be removed
  2. OSX has an incompatible sys queue.h
  3. replace strndupa with strndup

Best,
D

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions