Set global errno value accordingly.

Signed-off-by: Krzysztof Wilczynski <krzysztof.wilczynski@linux.com>
[ci skip] Update the .gitignore file.

Signed-off-by: Krzysztof Wilczynski <krzysztof.wilczynski@linux.com>
Make behaviour consistent among various versions of libmagic adhering to the POSIX standard.

This concerns the following IEEE 1003.1 standards:

  http://pubs.opengroup.org/onlinepubs/007904975/utilities/file.html
  http://pubs.opengroup.org/onlinepubs/9699919799/utilities/file.html

Signed-off-by: Krzysztof Wilczynski <krzysztof.wilczynski@linux.com>
Merge branch 'compatibility-fix'

* compatibility-fix:
  Make behaviour consistent among various versions of libmagic adhering to the POSIX standard.
  Set global errno value accordingly.