<div dir="ltr">Patch seems ok and does not produce build errors on my system.<br></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Wed, Apr 16, 2014 at 3:25 AM, Michael Ira Krufky <span dir="ltr"><<a href="mailto:mkrufky@linuxtv.org" target="_blank">mkrufky@linuxtv.org</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Building libdvbpsi under OSX Mavericks gives the following build error<br>
without the attached inline patch applied (see below) I found the<br>
problem is resolved by including <sys/types.h><br>
<br>
Having this applied doesn't cause problems for me on other platforms,<br>
but I'm not sure if it's actually correct. Could you please take a<br>
look and apply if you feel it's appropriate?<br>
<br>
This is the error I get on Mavericks:<br>
<br>
gcc -DHAVE_CONFIG_H -I. -I../.. -D_FILE_OFFSET_BITS=64 -DDVBPSI_DIST<br>
-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<br>
In file included from buffer.c:39:<br>
./buffer.h:56:1: error: unknown type name 'ssize_t'; did you mean 'size_t'?<br>
ssize_t fifo_count(fifo_t *fifo);<br>
^~~~~~~<br>
size_t<br>
/usr/include/sys/_types/_size_t.h:30:32: note: 'size_t' declared here<br>
typedef __darwin_size_t size_t;<br>
^<br>
buffer.c:46:5: error: unknown type name 'ssize_t'; did you mean 'size_t'?<br>
ssize_t i_count;<br>
^~~~~~~<br>
size_t<br>
/usr/include/sys/_types/_size_t.h:30:32: note: 'size_t' declared here<br>
typedef __darwin_size_t size_t;<br>
^<br>
buffer.c:126:1: error: unknown type name 'ssize_t'; did you mean 'size_t'?<br>
ssize_t fifo_count(fifo_t *fifo)<br>
^~~~~~~<br>
size_t<br>
/usr/include/sys/_types/_size_t.h:30:32: note: 'size_t' declared here<br>
typedef __darwin_size_t size_t;<br>
^<br>
buffer.c:129:5: error: unknown type name 'ssize_t'; did you mean 'size_t'?<br>
ssize_t count = fifo->i_count;<br>
^~~~~~~<br>
size_t<br>
/usr/include/sys/_types/_size_t.h:30:32: note: 'size_t' declared here<br>
typedef __darwin_size_t size_t;<br>
^<br>
4 errors generated.<br>
make[3]: *** [dvbinfo-buffer.o] Error 1<br>
make[2]: *** [all-recursive] Error 1<br>
make[1]: *** [all-recursive] Error 1<br>
make: *** [all] Error 2<br>
<br>
Signed-off-by: Michael Ira Krufky <<a href="mailto:mkrufky@linuxtv.org">mkrufky@linuxtv.org</a>><br>
---<br>
examples/dvbinfo/buffer.c | 2 ++<br>
1 file changed, 2 insertions(+)<br>
<br>
diff --git a/examples/dvbinfo/buffer.c b/examples/dvbinfo/buffer.c<br>
index f03a3bb..1dbb9d6 100644<br>
--- a/examples/dvbinfo/buffer.c<br>
+++ b/examples/dvbinfo/buffer.c<br>
@@ -32,6 +32,8 @@<br>
# include <stdint.h><br>
#endif<br>
<br>
+#include <sys/types.h><br>
+<br>
#include <assert.h><br>
<br>
typedef int64_t mtime_t;<br>
<span class="HOEnZb"><font color="#888888">--<br>
1.8.3.2<br>
</font></span></blockquote></div><br></div>