libc_lwip: 'fcntl()' fix

Fixes #1273
SDL: evaluate the motion event type

Fixes #1272