Lines 16-22
Link Here
|
16 |
#ifndef HAVE_SCANDIR |
16 |
#ifndef HAVE_SCANDIR |
17 |
int n = scandir(d, list, 0, sort); |
17 |
int n = scandir(d, list, 0, sort); |
18 |
-#elif defined(__hpux) || defined(__CYGWIN__) || (__GLIBC__ >= 2 && __GLIBC_MINOR__ >= 10 ) |
18 |
-#elif defined(__hpux) || defined(__CYGWIN__) || (__GLIBC__ >= 2 && __GLIBC_MINOR__ >= 10 ) |
19 |
+#elif defined(__hpux) || defined(__CYGWIN__) || (__GLIBC__ >= 2 && __GLIBC_MINOR__ >= 10 ) || (defined(__FreeBSD__) && __FreeBSD_version >= 900006) |
19 |
+#elif defined(__hpux) || defined(__CYGWIN__) || (__GLIBC__ >= 2 && __GLIBC_MINOR__ >= 10 ) || (defined(__FreeBSD__) && ( (__FreeBSD_version < 900000 && __FreeBSD_version >= 800501) || (__FreeBSD_version >= 900006))) |
20 |
// HP-UX, Cygwin and POSIX (2008) define the comparison function like this: |
20 |
// HP-UX, Cygwin and POSIX (2008) define the comparison function like this: |
21 |
int n = scandir(d, list, 0, (int(*)(const dirent **, const dirent **))sort); |
21 |
int n = scandir(d, list, 0, (int(*)(const dirent **, const dirent **))sort); |
22 |
#elif defined(__osf__) |
22 |
#elif defined(__osf__) |