Windows port fixes
authorAdam Dickmeiss <adam@indexdata.dk>
Wed, 9 Sep 2009 13:23:04 +0000 (15:23 +0200)
committerAdam Dickmeiss <adam@indexdata.dk>
Wed, 9 Sep 2009 13:23:04 +0000 (15:23 +0200)
src/pazpar2_config.c

index 24f4c86..3e2290e 100644 (file)
@@ -46,7 +46,9 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
 #endif
 #include <sys/types.h>
 #include <sys/stat.h>
+#if HAVE_UNISTD_H
 #include <unistd.h>
+#endif
 #include "pazpar2_config.h"
 #include "settings.h"
 #include "eventl.h"
@@ -751,7 +753,7 @@ static int config_include_one(struct conf_config *config, xmlNode **sib,
     }
     else
     {
-        if (S_ISREG(st.st_mode))
+        if ((st.st_mode & S_IFMT) == S_IFREG)
         {
             xmlDoc *doc = xmlParseFile(path);
             yaz_log(YLOG_LOG, "processing include path=%s", path);