readdir(): set missing d_reclen field

Our "struct dirent" returned by readdir() has a field d_reclen, which
our implementation didn't set. Given that our BSD-based implementation
has a constant size (the file name is limited to 256 bytes), d_reclen
is not very interesting since it's always sizeof(dirent). But nevertheless,
we must set it because Linux programs may rely on it.
So this patch correctly sets d_reclen.

In particular, the scandir() implementation we copied from Musl relies
on d_reclen being correctly set, so before this patch, it did not work
correctly (returned empty dirent structures). This patch also adds a
test for scandir(), which fails before this patch, and succeeds with
this patch.

Signed-off-by: Nadav Har'El <nyh@cloudius-systems.com>
Signed-off-by: Pekka Enberg <penberg@cloudius-systems.com>
Bump up apps.git pointer

Signed-off-by: Tomasz Grabiec <tgrabiec@cloudius-systems.com>
Signed-off-by: Pekka Enberg <penberg@cloudius-systems.com>
make: fix typo in .PHONY

Signed-off-by: Tomasz Grabiec <tgrabiec@cloudius-systems.com>
Signed-off-by: Pekka Enberg <penberg@cloudius-systems.com>
make: clean all modules on 'make clean'

If you don't want to clean modules run 'make clean-core'

Signed-off-by: Tomasz Grabiec <tgrabiec@cloudius-systems.com>
Signed-off-by: Pekka Enberg <penberg@cloudius-systems.com>
scripts: Support both python2 and python3 for api.py

Since Python3 basestring has been removed. Therefor to use isinstance
it needs to pass str instead of basestring.

Signed-off-by: Masami Ichikawa <masami256@gmail.com>
Signed-off-by: Pekka Enberg <penberg@cloudius-systems.com>