On Thu, 1 Apr 2021 08:07:56 GMT, Johan Vos <j...@openjdk.org> wrote: >> I cannot reproduce build failure on Linux. > > It compiles for me (on gcc-9, 10.1 and 10.2) but I can imagine it doesn't > compile on all configurations. `memset` is declared in `string.h` and that > may or may not be included. > Running gcc -H shows that on my system, `string.h` is included by > `glib-2.0/glib/gtestutils.h` (which is included by `glib-2.0/glib.h`) but on > other systems, that might not be the case. > Since this PR introduces `memset` in the `audio-buffer.c` file, I think it is > safest to include `string.h` in this file as well, as this removes the > dependency on that file to be included indirectly.
Alexander tried it on our CI build machine yesterday and it builds fine there, too. I should add that I was building on a very old Ubuntu 16.04 system. > Since this PR introduces memset in the audio-buffer.c file, I think it is > safest to include string.h in this file as well, as this removes the > dependency on that file to be included indirectly. I was thinking the same thing. There is one more file that should include `<string.h>`: `qtdemux_tags.c` uses `strlen`and fails to compile on my system. With the change to include `string.h` in those two files, the build now passes on my system. ------------- PR: https://git.openjdk.java.net/jfx/pull/447