8000 'struct dirent' has no member named 'd_type' on Solaris · Issue #3194 · collectd/collectd · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
'struct dirent' has no member named 'd_type' on Solaris #3194
Closed
@dago

Description

@dago

I am currently trying to compile the current collectd from master on Solaris 10 Sparc.
Among the PR #3193 the struct dirent does not have d_type:

  CC       src/utils/proc_pids/proc_pids_test.o
In file included from src/utils/proc_pids/proc_pids_test.c:1:0:
./src/utils/proc_pids/proc_pids.c: In function 'get_pid_number':
./src/utils/proc_pids/proc_pids.c:198:12: error: 'struct dirent' has no member named 'd_type'
   if (entry->d_type != DT_DIR)
            ^
./src/utils/proc_pids/proc_pids.c:198:24: error: 'DT_DIR' undeclared (first use in this function)
   if (entry->d_type != DT_DIR)
                        ^
./src/utils/proc_pids/proc_pids.c:198:24: note: each undeclared identifier is reported only once for each function it appears in
src/utils/proc_pids/proc_pids_test.c: In function 'stub_procfs_setup':
src/utils/proc_pids/proc_pids_test.c:43:45: error: format '%d' expects argument of type 'int', but argument 5 has type 'pid_t {aka const long int}' [-Werror=format=]
     snprintf(path, STATIC_ARRAY_SIZE(path), "%s/%d", proc_fs,
                                             ^
src/utils/proc_pids/proc_pids_test.c: In function 'test_get_pid_number__valid_dir':
src/utils/proc_pids/proc_pids_test.c:196:4: error: 'struct dirent' has no member named 'd_type'
   d.d_type = DT_DIR;
    ^
src/utils/proc_pids/proc_pids_test.c:196:14: error: 'DT_DIR' undeclared (first use in this function)
   d.d_type = DT_DIR;
              ^
src/utils/proc_pids/proc_pids_test.c: In function 'test_get_pid_number__invalid_dir_name':
src/utils/proc_pids/proc_pids_test.c:213:4: error: 'struct dirent' has no member named 'd_type'
   d.d_type = DT_DIR;
    ^
src/utils/proc_pids/proc_pids_test.c:213:14: error: 'DT_DIR' undeclared (first use in this function)
   d.d_type = DT_DIR;
              ^
src/utils/proc_pids/proc_pids_test.c: In function 'test_read_proc_name__valid_name':
src/utils/proc_pids/proc_pids_test.c:232:4: error: 'struct dirent' has no member named 'd_type'
   d.d_type = DT_DIR;
    ^
src/utils/proc_pids/proc_pids_test.c:232:14: error: 'DT_DIR' undeclared (first use in this function)
   d.d_type = DT_DIR;
              ^
src/utils/proc_pids/proc_pids_test.c: In function 'test_read_proc_name__invalid_name':
src/utils/proc_pids/proc_pids_test.c:250:4: error: 'struct dirent' has no member named 'd_type'
   d.d_type = DT_DIR;
    ^
src/utils/proc_pids/proc_pids_test.c:250:14: error: 'DT_DIR' undeclared (first use in this function)
   d.d_type = DT_DIR;
              ^
cc1: all warnings being treated as errors

As this is from the testsuite: should this test best be skipped after verification of absence of d_type or is the test worth to be rewritten?

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions

    0