Open juanitotc opened 3 years ago
This one probably needs "#define _GNU_SOURCE" at the top, above all
Unfortunately it's not that:
platform/LocalizedStrings.cpp:26: warning: "_GNU_SOURCE" redefined
26 | #define _GNU_SOURCE
|
<command-line>: note: this is the location of the previous definition
platform/LocalizedStrings.cpp: In function 'WTF::String WebCore::formatLocalizedString(WTF::String, ...)':
platform/LocalizedStrings.cpp:74:21: error: 'vasprintf' was not declared in this scope; did you mean 'vswprintf'?
74 | const int ret = vasprintf(&tmp, format.utf8().data(), ap);
| ^~~~~~~~~
| vswprintf
make: *** [Makefile:3549: platform/LocalizedStrings.o] Error 1
I don't see anything similiar on google - where in webkit git do you source the port from?
This part is custom code.
Well, if not GNU_SOURCE, then it's gcc changing its includes again, and the file needs an "#include
That appears to have fixed things :)
This is the patch that fixes it for gcc-10.1.0:
--- Source/WebCore/platform/LocalizedStrings.cpp.orig 2020-11-20 14:35:13.139811798 +0100
+++ Source/WebCore/platform/LocalizedStrings.cpp 2020-11-20 12:26:38.555816396 +0100
@@ -33,6 +33,8 @@
#include <wtf/text/CString.h>
#include <wtf/unicode/CharacterNames.h>
+#include <stdio.h>
+
#if USE(CF)
#include <wtf/RetainPtr.h>
#endif
Building natively on an RPi aarch64 - after applying the patch in #28 , sometime later, the build fails with:
if "vswprintf" is substituted, the build fails with: