summaryrefslogtreecommitdiffstats
path: root/conf.c
diff options
context:
space:
mode:
authorRainer Gerhards <rgerhards@adiscon.com>2008-03-05 07:01:35 +0000
committerRainer Gerhards <rgerhards@adiscon.com>2008-03-05 07:01:35 +0000
commit80e69562be86d149d753530a8a57c5babbb3f4c3 (patch)
tree021a608559e734833a7d23f03444fde66bf38076 /conf.c
parent05ba3fbffeaa3142e917ea69e9e39209e893581a (diff)
downloadrsyslog-80e69562be86d149d753530a8a57c5babbb3f4c3.tar.gz
rsyslog-80e69562be86d149d753530a8a57c5babbb3f4c3.tar.xz
rsyslog-80e69562be86d149d753530a8a57c5babbb3f4c3.zip
did some portability changes to make rsyslog compile on HP UX
Diffstat (limited to 'conf.c')
-rw-r--r--conf.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/conf.c b/conf.c
index 0c304529..e4fb362b 100644
--- a/conf.c
+++ b/conf.c
@@ -40,6 +40,9 @@
#include <dirent.h>
#include <glob.h>
#include <sys/types.h>
+#ifdef HAVE_LIBGEN_H
+# include <libgen.h>
+#endif
#include "rsyslog.h"
#include "syslogd.h"
@@ -117,8 +120,16 @@ static rsRetVal doIncludeDirectory(uchar *pDirName)
while(readdir_r(pDir, &u.d, &res) == 0) {
if(res == NULL)
break; /* this also indicates end of directory */
+# ifdef DT_REG
+ /* TODO: find an alternate way to checking for special files if this is
+ * not defined. This is currently a known problem on HP UX, but the work-
+ * around is simple: do not create special files in that directory. So
+ * fixing this is actually not the most important thing on earth...
+ * rgerhards, 2008-03-04
+ */
if(res->d_type != DT_REG)
continue; /* we are not interested in special files */
+# endif
if(res->d_name[0] == '.')
continue; /* these files we are also not interested in */
++iEntriesDone;