Add gitignore
Merge branch 'gitignore'

* gitignore:
  Add gitignore
Add build script for static compilation
Work around bug in musl's fgets

musl's fgets will always write the trailing null-byte, even when it did
not write any data and returns NULL. This is a bug, because ISO/IEC
9899:1999 (7.21.7.2) says the contents of the buffer must remain
unchanged. Reported upstream via IRC.