The laws are a joke by people who apparently flunked "Hello World".
They demand a mechanism, but don't even offer guidance on what mechanism it should be. You can technically comply while having no 2 Linux installs following the same API, making it effectively useless.
A better approach would be a purely optional userspace package (perhaps call it "Californication") that returns 1 dword with the age information encoded in it. Each person installing it gets to decide what that encoding will be.
Yes, it returned 0x0BADF00D, that's the code for 18+.
Someone else might decide 0x0B00B1E5 means 18+.