Details

    • Type: Bug
    • Status: Closed
    • Priority: Critical
    • Resolution: Fixed
    • Affects Version/s: 3.3.4
    • Fix Version/s: 3.4.7, 3.5.2, 3.6.0
    • Component/s: build, c client
    • Labels:
      None
    • Environment:

      uname -a: SunOS [redacted] 5.10 Generic_142910-17 i86pc i386 i86pc
      GNU toolchain (gcc 3.4.3, GNU Make etc.)

    • Release Note:
      Support for building C client lib on Illumos (and presumably OpenSolaris). Configure with "CPPFLAGS=-D_POSIX_PTHREAD_SEMANTICS LDFLAGS="-lnsl -lsocket" ./configure"

      Description

      Hello,

      Some minor trouble with building ZooKeeper C client library on Sun^H^H^HOracle Solaris 5.10.

      1. You need to link against "-lnsl -lsocket"

      2. ctime_r needs a buffer size. The signature is: "char *ctime_r(const time_t *clock, char *buf, int buflen)"

      3. In zk_log.c you need to manually cast pid_t to int (-Werror can be cumbersome )

      4. getpwuid_r()returns pointer to struct passwd, which works as the last parameter on Linux.

      Solaris signature: struct passwd *getpwuid_r(uid_t uid, struct passwd *pwd, char *buffer, int buflen);
      Linux signature: int getpwuid_r(uid_t uid, struct passwd *pwd, char *buf, size_t buflen, struct passwd **result);

        Attachments

        1. ZOOKEEPER-1077-branch-3.4.002.patch
          5 kB
          Chris Nauroth
        2. ZOOKEEPER-1077.002.patch
          5 kB
          Chris Nauroth
        3. ZOOKEEPER-1077.001.patch
          3 kB
          Chris Nauroth
        4. zookeeper.patch
          5 kB
          Justin SB

          Issue Links

            Activity

              People

              • Assignee:
                cnauroth Chris Nauroth
                Reporter:
                tkadlubo Tadeusz Andrzej Kadłubowski
              • Votes:
                0 Vote for this issue
                Watchers:
                6 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: