diff --git a/contrib/pg_upgrade/file.c b/contrib/pg_upgrade/file.c index f035a6ad2f..2bdda622eb 100644 --- a/contrib/pg_upgrade/file.c +++ b/contrib/pg_upgrade/file.c @@ -245,7 +245,7 @@ pg_scandir(migratorContext *ctx, const char *dirname, * autoconf doesn't have a suitable builtin test and it seems overkill * to add one just to avoid a warning. */ -#elif defined(freebsd) || defined(bsdi) || defined(darwin) || defined(openbsd) +#elif defined(freebsd) || defined(bsdi) || defined(__darwin__) || defined(openbsd) /* no const */ return scandir(dirname, namelist, (int (*) (struct dirent *)) selector, NULL); #else