port ldd3 source code examples to linux 3.x