Update src/dirs.c

Code update (portability issue).