From cb182680495b7b6e5076b38d7ff8d720de86a6d5 Mon Sep 17 00:00:00 2001 From: Ron Pedde Date: Sun, 8 Oct 2006 23:14:37 +0000 Subject: [PATCH] Autoconf for dirent, rather than win32ing --- configure.in | 1 + src/mp3-scanner.c | 7 ++++--- src/scan-flac.c | 5 +++-- src/xml-rpc.c | 4 ++-- 4 files changed, 10 insertions(+), 7 deletions(-) diff --git a/configure.in b/configure.in index e3bc145e..5ba9402d 100644 --- a/configure.in +++ b/configure.in @@ -14,6 +14,7 @@ AC_PROG_LIBTOOL AC_CHECK_HEADERS([sys/wait.h]) AC_CHECK_HEADERS([sys/param.h]) +AC_CHECK_HEADERS([dirent.h]) AC_CHECK_FUNCS(strptime) AC_CHECK_FUNCS(strtok_r) AC_CHECK_FUNCS(timegm) diff --git a/src/mp3-scanner.c b/src/mp3-scanner.c index ac427a53..4f660c2e 100644 --- a/src/mp3-scanner.c +++ b/src/mp3-scanner.c @@ -39,10 +39,11 @@ #include #include #include - +#ifdef HAVE_DIRENT_H +# include +#endif #ifndef WIN32 -#include /* htons and friends */ -#include /* why here? For osx 10.2, of course! */ +# include /* htons and friends */ #endif #include diff --git a/src/scan-flac.c b/src/scan-flac.c index f88900b4..5cc35c61 100644 --- a/src/scan-flac.c +++ b/src/scan-flac.c @@ -32,10 +32,11 @@ #include #include #include - +#ifdef HAVE_DIRENT_H +# include /* why here? For osx 10.2, of course! */ +#endif #ifndef WIN32 # include /* htons and friends */ -# include /* why here? For osx 10.2, of course! */ #endif #include diff --git a/src/xml-rpc.c b/src/xml-rpc.c index e053ab56..2acd92e1 100644 --- a/src/xml-rpc.c +++ b/src/xml-rpc.c @@ -8,8 +8,8 @@ # include "config.h" #endif -#ifndef WIN32 -#include /* c'mon, config for this */ +#ifdef HAVE_DIRENT_H +# include #endif #include #include