The Google vs. Oracle lawsuit was about public APIs, not about internal programming interfaces inside a program.
A public API might require emulating for compatibility & interoperability reasons, but internal programming interfaces are something entirely different (they are only to be used by the program itself, so any code using it is part of the program).
Also, in this case they do not only use the kernel programming interface, they also link it tot the linux kernel itself.