Post by James TurnerPost by James TurnerI had to add stdint.h to spipe/pushbits.c before spipe would compile on
archlinux. uint8_t was returning unknown type without it. Thanks.
On a somewhat related note, I did not need stdint.h on OpenBSD, but did
need to add sys/types.h to both spipe/main.c and spipe/pushbits.c as
sys/socket.h depends on it under OpenBSD.
uint8_t became a standard with C99 but it was used before the standard
was ratified. C99 compilers doesn't recognize uintX_t types but the
standard specifies 'stdint.h' for their definition.
'sys/types.h' in OpenBSD defines ``uint8_t'' as an ``__uint8_t'' which
will be typedef'd to appropriate type for the architecture in
'sys/arch/`uname -m`/include/_types.h'. For every architecture it is
typedef'd from ``unsigned char''.
For Mac OS X Mountain Lion, I also needed to include 'stdint.h' and
remove unconditional ``-lrt'' from LDADD. I'm guessing the
requirement for POSIX Realtime Extensions Library arose from
``clock_gettime'' which doesn't exists on Mac OS X but this case is
handled in 'lib/util/monoclock.c' and if CLOCK_MONOTONIC is not
defined, ``gettimeofday`` is used.
I submitted a pull request to Homebrew with a small patch for handling
'stdint.h' inclusion and '-lrt' removal.
Pull Request: https://github.com/mxcl/homebrew/pull/14576
Patch: https://raw.github.com/gist/3541617/e212734f3ff105f636ea6e225ad7c9d5cb0ce347/spiped-1.2.0-macosx-mountain-lion.patch