summaryrefslogtreecommitdiff
path: root/usr/src/lib/fm/libfmd_log/common
diff options
context:
space:
mode:
authorcasper <none@none>2005-11-09 11:19:56 -0800
committercasper <none@none>2005-11-09 11:19:56 -0800
commit4bc0a2ef2b7ba50a7a717e7ddbf31472ad28e358 (patch)
tree8076ef765d7019096fce872c8359a5345dee3160 /usr/src/lib/fm/libfmd_log/common
parent205d86ae4bc9e661871ff365f59324d8c9b0108a (diff)
downloadillumos-joyent-4bc0a2ef2b7ba50a7a717e7ddbf31472ad28e358.tar.gz
6346636 expunge readdir_r uses from Solaris
6346809 S_IFxxx is not a bitmask but our programmers don't know
Diffstat (limited to 'usr/src/lib/fm/libfmd_log/common')
-rw-r--r--usr/src/lib/fm/libfmd_log/common/fmd_log.c11
1 files changed, 2 insertions, 9 deletions
diff --git a/usr/src/lib/fm/libfmd_log/common/fmd_log.c b/usr/src/lib/fm/libfmd_log/common/fmd_log.c
index d47bc241ed..c052587099 100644
--- a/usr/src/lib/fm/libfmd_log/common/fmd_log.c
+++ b/usr/src/lib/fm/libfmd_log/common/fmd_log.c
@@ -38,11 +38,7 @@
#include <fcntl.h>
#include <errno.h>
#include <libgen.h>
-
-#define _POSIX_PTHREAD_SEMANTICS
#include <dirent.h>
-#undef _POSIX_PTHREAD_SEMANTICS
-
#include <fmd_log_impl.h>
#include <fmd_log.h>
@@ -273,7 +269,7 @@ fmd_log_load_xrdir(fmd_log_t *lp)
{
fmd_log_t *xlp;
char dirbuf[PATH_MAX], path[PATH_MAX], *dirpath;
- struct dirent *dp, *ep;
+ struct dirent *dp;
DIR *dirp;
lp->log_flags |= FMD_LF_XREFS;
@@ -283,10 +279,7 @@ fmd_log_load_xrdir(fmd_log_t *lp)
if ((dirp = opendir(dirpath)) == NULL)
return; /* failed to open directory; just skip it */
- ep = alloca(sizeof (struct dirent) + PATH_MAX + 1);
- bzero(ep, sizeof (struct dirent) + PATH_MAX + 1);
-
- while (readdir_r(dirp, ep, &dp) == 0 && dp != NULL) {
+ while ((dp = readdir(dirp)) != NULL) {
if (dp->d_name[0] == '.')
continue; /* skip "." and ".." and hidden files */