If the code has implicit function declarations, it needs to be build with -std=gnu89 because these declarations are a C89 feature. A future compiler will likely reject this: ../../3rdparty/chromium/third_party/libsync/src/sync.c:80:5: error: implicit declaration of function 'strlcpy' 80 | strlcpy(data.name, name, sizeof(data.name)); | ^~~~~~~ In GCC, warning flags do not gate access to obsolete language constructs, so -Wno-implicit-function-declaration is unlikely to work for this. If this is old, pre-ANSI code, -std=gnu89 should work fine.
Do you know where qt5-webengine/Chromium get their copy of libsync from?
This bug appears to have been reported against 'rawhide' during the Fedora Linux 38 development cycle. Changing version to 38.
(In reply to Florian Weimer from comment #1) > Do you know where qt5-webengine/Chromium get their copy of libsync from? https://source.chromium.org/chromium/chromium/src/+/main:third_party/libsync/README.chromium
It looks strlcpy() is an addition Chromium adds on its own.
Created attachment 1945899 [details] qt5-qtwebengine-c99.patch This patch seems to fix it.
I think it would be cleaner to use a proper header file for strlcpy, but sure, as long as the function is only used in one .c file, this will work. And for jgrulich: strlcpy is one of those safer string functions from BSD that glibc unfortunately refuses to add (see https://lwn.net/Articles/507319/ – more than 10 years old and yet still current) because they are not required by any standard. They can be found in libbsd, but sadly many projects prefer just copying&pasting the code over adding a small dependency, and that is what Chromium is doing here.
Any further comments before i push this patch? Thanks.
Just to be clear: I'm OK with you pushing this.