RFR: 8326433: Make libjdwp and libjava closeDescriptors() as static function
Chris Plummer
cjplummer at openjdk.org
Mon Feb 26 20:43:45 UTC 2024
On Mon, 26 Feb 2024 20:20:31 GMT, Jiangli Zhou <jiangli at 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
More information about the core-libs-dev
mailing list