On Thu, Dec 15, 2016 at 04:59:38PM +0100, Michael Kerrisk (man-pages) wrote: > [...] > All fixed now. This is the current code: > > #define _DEFAULT_SOURCE > #include <dirent.h> > #include <stdio.h> > #include <stdlib.h> > > int > main(void) > { > struct dirent **namelist; > int n; > > n = scandir(".", &namelist, NULL, alphasort); > if (n == -1) { > perror("scandir"); > exit(EXIT_FAILURE); > } > > while (n--) { > printf("%s\n", namelist[n]->d_name); > free(namelist[n]); > } > free(namelist); > > exit(EXIT_SUCCESS); > }
Confirmed to be present in man-pages-4.10 (first packaged in Debian in 4.10-1) and also confirmed working, hence this bug could be closed accordingly. Cheers, Flo
signature.asc
Description: PGP signature