_GNU_SOURCE is also used by musl.
https://git.musl-libc.org/cgit/musl/tree/include/stdio.h?h=v1.2.1#n166
Signed-off-by: Issam E. Maghni <issam.e.maghni@mailbox.org>
---
src/tls.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/src/tls.c b/src/tls.c
index 8595ecd..a81c3b2 100644
--- a/src/tls.c+++ b/src/tls.c
@@ -15,6 +15,8 @@
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
+#define _GNU_SOURCE+#include <sys/socket.h>
#include <errno.h>
--
2.28.0
Sorry for the huge delay. I hadn't set up mailing list filters, so
these slipped passed me.
I don't quite understand the motivation for this change. Could you
explain what problem this solves?
On Thu Oct 15, 2020 at 7:09 PM Michael Forney wrote:
> Sorry for the huge delay.
Don’t worry, I don’t mind.
> I don't quite understand the motivation for this change. Could you> explain what problem this solves?
Well, it cleans the repository by having a clear cut between source
code, headers, documentation, build systems, etc.
I maintain a forked version where I added Meson build system to ease the
development (e.g. auto generation of compile_commands.json) and fixed
some defines. See https://git.sr.ht/~iemaghni/libtls-bearssl. Feel free
to upstream my changes if you want :)
I also maintain a forked version of BearSSL with Meson build system here
https://git.sr.ht/~iemaghni/libbearssl. I moved all the bearssl_*.h into
bearssl/*.h. Naturally, I proposed to upstream my changes to Thomas
Pornin but I have not heard a responce since.
Issam E.
On 2020-10-16, Issam E. Maghni <issam.e.maghni@mailbox.org> wrote:
> Well, it cleans the repository by having a clear cut between source> code, headers, documentation, build systems, etc.
I actually find that the source is easier to work with a flat
hierarchy. Occasionally I am fine with an "include" directory, but I
think it should only contain headers meant to be installed into
$PREFIX/include, not internal headers like tls_internal.h.
> I maintain a forked version where I added Meson build system to ease the> development (e.g. auto generation of compile_commands.json) and fixed> some defines. See https://git.sr.ht/~iemaghni/libtls-bearssl. Feel free> to upstream my changes if you want :)
I am not interested in meson. In my experience it is more difficult to
use as an end-user than autotools, adds more build time dependencies
(python, meson, ninja), and is less configurable. It is difficult to
control precisely how dependencies are detected (as opposed to being
able to set foo_{CFLAGS,LIBS,LDFLAGS}), and it only works with a
specific set of hardcoded compilers (i.e. I can't use my own compiler
cproc, despite it following the POSIX c99(1) interface). make(1) is a
POSIX standard tool and is available everywhere.
Regarding the other changes, I prefer to just not enable warnings with
questionable value (-Wextra) in the first place rather than adding a
bunch of non-standard annotations to disable the warning.
Anyway, I apologize if this comes across as a bit harsh. Of course you
are free to maintain your forks with meson if that works better for
you, and I am happy you are interested in libtls-bearssl. It's just
not the first time I've received pull-requests/patches for projects
that reorganize source files and/or port to meson. I hope you can
understand my position here.
-Michael