From bda7041643506840787e7f91ab3f7fdc3eea8472 Mon Sep 17 00:00:00 2001 From: Robin Gareus Date: Thu, 4 Apr 2024 17:02:20 +0200 Subject: [PATCH] Fix #9642 - fdopen(3) requires _POSIX_C_SOURCE Without this, fdopen() returns some garbage FILE* which causes a crash when used. --- libs/tk/ydk-pixbuf/wscript | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/libs/tk/ydk-pixbuf/wscript b/libs/tk/ydk-pixbuf/wscript index 0d7f7739f7..8995b54681 100644 --- a/libs/tk/ydk-pixbuf/wscript +++ b/libs/tk/ydk-pixbuf/wscript @@ -1,6 +1,7 @@ #!/usr/bin/env python from waflib.extras import autowaf as autowaf import sys +import re # Version of this package (even if built as a child) MAJOR = '2' @@ -63,3 +64,6 @@ def build(bld): if sys.platform == 'darwin': obj.uselib += ' OSX' obj.ldflags = ' -lintl' + + if re.search ("bsd", sys.platform) != None: + obj.defines.append('_POSIX_C_SOURCE=200809')