On Mon, 26 Feb 2024 20:20:31 GMT, Jiangli Zhou <jian...@openjdk.org> wrote:

> Please help review this trivial fix for resolving `ld: error: duplicate 
> symbol: closeDescriptors` when static linking with both libjdwp and libjava, 
> thanks.

src/java.base/unix/native/libjava/childproc.h line 134:

> 132: int closeSafely(int fd);
> 133: int isAsciiDigit(char c);
> 134: int closeDescriptors(void);

It seems that most of the APIs in this file should be static. I don't think you 
should selectively deal with just one of them because of the conflict. Since 
this ends up being a more involved change, and is in a different component than 
the jdwp change, it should probably have a separate PR.

src/jdk.jdwp.agent/unix/native/libjdwp/exec_md.c line 65:

> 63: // by this function. This function returns 0 on failure
> 64: // and 1 on success.
> 65: static int

I think you should also make forkedChildProcess static. It was added at the 
same time.

-------------

PR Review Comment: https://git.openjdk.org/jdk/pull/18013#discussion_r1503271560
PR Review Comment: https://git.openjdk.org/jdk/pull/18013#discussion_r1503268736

Reply via email to