fmang / opustags

Ogg Opus tags editor
BSD 3-Clause "New" or "Revised" License
75 stars 10 forks source link

Include headers for mkstemps #42

Closed fmang closed 3 years ago

fmang commented 3 years ago

Close #41

@yurivict Could you please try to build this branch?

yurivict commented 3 years ago

I am sorry, but unistd.h should be included, not stdlib.h, on FreeBSD: https://www.freebsd.org/cgi/man.cgi?query=mkstemp&sektion=3

Sincestdlib.h is also missing for Linux, maybe a correct patch is to add:

#include <stdlib.h>
#if defined(__FreeBSD__)
#include <unistd.h>
#endif
fmang commented 3 years ago

Wow, I did not expect that.

Let’s include both headers unconditionally for better compatibility, in case there are other BSDs that would require unistd too.

fmang commented 3 years ago

Let’s merge this. @yurivict Would you like me to release it as 1.5.1 or do you fetch master?

yurivict commented 3 years ago

@yurivict Would you like me to release it as 1.5.1 or do you fetch master?

I would prefer a release.

Thank you.

fmang commented 3 years ago

@yurivict Alright! Before that, may I ask you to ensure that the new --edit feature works as expected? It integrates with the system editor and calls the shell, so even if I think the implementation is portable, who knows what may happen. You can invoke it like EDITOR=vim opustags -e in.opus -o out.opus.

yurivict commented 3 years ago

Ok. I will check this feature when I will update the port.

fmang commented 3 years ago

@yurivict If you will I’d like you to test it before I release, in case you find another issue.

yurivict commented 3 years ago

@fmang Can you add to the README links to good opus file examples to test it with, because the links on https://opus-codec.org/ are broken.

yurivict commented 3 years ago

I tested the current master on FreeBSD 12.2. The --edit feature works.

yurivict commented 3 years ago

There's also this patch in the port that can be upstreamed:

--- src/opus.cc.orig    2020-11-08 09:32:46 UTC
+++ src/opus.cc
@@ -23,6 +23,7 @@

 #include <opustags.h>

+#include <sys/endian.h>
 #include <string.h>

 #ifdef __APPLE__