elixir-vision / picam

Elixir library used to capture MJPEG video on a Raspberry Pi using the camera module.
Other
122 stars 27 forks source link

Include sys/uio.h #36

Closed GregMefford closed 5 years ago

GregMefford commented 5 years ago

When using Picam with more recent Nerves versions, it looks like the gcc defaults are different, making writev no longer available by default. Explicitly including sys/uio.h resolves this.

src/raspijpgs.c: In function 'output_jpeg':
src/raspijpgs.c:727:21: warning: implicit declaration of function 'writev'; did you mean 'write'? [-Wimplicit-function-declaration]
     ssize_t count = writev(STDOUT_FILENO, iovs, 2);
                     ^~~~~~
                     write

I was going to propose that we release this simple change as a 0.3.1 bugfix, but it looks like there's already also something else merged against the 0.4.0-dev branch, so we can call it 0.4.0 instead.

electricshaman commented 5 years ago

Looks good!