[libdvbpsi-devel] [RFC PATCH] dvbinfo: fix error: unknown type name 'ssize_t'; did you mean 'size_t'?
Jean-Paul Saman
jpsaman at videolan.org
Wed Apr 16 09:09:29 CEST 2014
Patch seems ok and does not produce build errors on my system.
On Wed, Apr 16, 2014 at 3:25 AM, Michael Ira Krufky <mkrufky at linuxtv.org>wrote:
> Building libdvbpsi under OSX Mavericks gives the following build error
> without the attached inline patch applied (see below) I found the
> problem is resolved by including <sys/types.h>
>
> Having this applied doesn't cause problems for me on other platforms,
> but I'm not sure if it's actually correct. Could you please take a
> look and apply if you feel it's appropriate?
>
> This is the error I get on Mavericks:
>
> gcc -DHAVE_CONFIG_H -I. -I../.. -D_FILE_OFFSET_BITS=64 -DDVBPSI_DIST
> -g -O2 -Wall -Werror --std=gnu99 -D_GNU_SOURCE -Wpointer-arith
> -Wcast-align -Wcast-qual -Wstrict-prototypes -Wshadow -Waggregate-return
> -Wmissing-prototypes -Wnested-externs -Wsign-compare -DDVBPSI_DIST -MT
> dvbinfo-buffer.o -MD -MP -MF .deps/dvbinfo-buffer.Tpo -c -o
> dvbinfo-buffer.o `test -f 'buffer.c' || echo './'`buffer.c
> In file included from buffer.c:39:
> ./buffer.h:56:1: error: unknown type name 'ssize_t'; did you mean 'size_t'?
> ssize_t fifo_count(fifo_t *fifo);
> ^~~~~~~
> size_t
> /usr/include/sys/_types/_size_t.h:30:32: note: 'size_t' declared here
> typedef __darwin_size_t size_t;
> ^
> buffer.c:46:5: error: unknown type name 'ssize_t'; did you mean 'size_t'?
> ssize_t i_count;
> ^~~~~~~
> size_t
> /usr/include/sys/_types/_size_t.h:30:32: note: 'size_t' declared here
> typedef __darwin_size_t size_t;
> ^
> buffer.c:126:1: error: unknown type name 'ssize_t'; did you mean 'size_t'?
> ssize_t fifo_count(fifo_t *fifo)
> ^~~~~~~
> size_t
> /usr/include/sys/_types/_size_t.h:30:32: note: 'size_t' declared here
> typedef __darwin_size_t size_t;
> ^
> buffer.c:129:5: error: unknown type name 'ssize_t'; did you mean 'size_t'?
> ssize_t count = fifo->i_count;
> ^~~~~~~
> size_t
> /usr/include/sys/_types/_size_t.h:30:32: note: 'size_t' declared here
> typedef __darwin_size_t size_t;
> ^
> 4 errors generated.
> make[3]: *** [dvbinfo-buffer.o] Error 1
> make[2]: *** [all-recursive] Error 1
> make[1]: *** [all-recursive] Error 1
> make: *** [all] Error 2
>
> Signed-off-by: Michael Ira Krufky <mkrufky at linuxtv.org>
> ---
> examples/dvbinfo/buffer.c | 2 ++
> 1 file changed, 2 insertions(+)
>
> diff --git a/examples/dvbinfo/buffer.c b/examples/dvbinfo/buffer.c
> index f03a3bb..1dbb9d6 100644
> --- a/examples/dvbinfo/buffer.c
> +++ b/examples/dvbinfo/buffer.c
> @@ -32,6 +32,8 @@
> # include <stdint.h>
> #endif
>
> +#include <sys/types.h>
> +
> #include <assert.h>
>
> typedef int64_t mtime_t;
> --
> 1.8.3.2
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.videolan.org/pipermail/libdvbpsi-devel/attachments/20140416/03045f06/attachment.html>
More information about the libdvbpsi-devel
mailing list