pkgsrc-Users archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Mac OSX xdrproc_t breaks NetBSD mysql57-server build

mysql-server-5.7.17 does not build on NetBSD-7, due to xdrfunc being
passed three parameters rather than two. eg:

                s = xdrfunc(&xdr, xdrdata, 0);

The source includes a comment to the effect:

          Mac OSX changed the xdrproc_t prototype to take
          three parameters instead of two.

          The argument is that it has the potential to break
          the ABI due to compiler optimizations.

          The recommended value for the third parameter is
          0 for those that are not making use of it (which
          is the case). This will keep this code cross-platform
          and cross-version compatible.

Its easy enough to add an if __APPLE__ around it, but would anyone
have an idea of a better way to handle this?

+#if __APPLE__
                s = xdrfunc(&xdr, xdrdata, 0);
+               s = xdrfunc(&xdr, xdrdata);

Home | Main Index | Thread Index | Old Index