Skip to content

Missing sys/stat.h header on Solaris #97

@l1gi

Description

@l1gi

Hello,

on Solaris I am getting following compile errors in libcupsfilters-2.1.1:

cupsfilters/testfilters.c: In function 'test_wrapper':
cupsfilters/testfilters.c:184:68: error: 'S_IRUSR' undeclared (first use in this function)
  184 |    if ((outputfd = open(outputFile, O_WRONLY | O_CREAT | O_APPEND, S_IRUSR | S_IWUSR)) < 0)
      |                                                                    ^~~~~~~
cupsfilters/testfilters.c:184:68: note: each undeclared identifier is reported only once for each function it appears in
cupsfilters/testfilters.c:184:78: error: 'S_IWUSR' undeclared (first use in this function)
  184 |    if ((outputfd = open(outputFile, O_WRONLY | O_CREAT | O_APPEND, S_IRUSR | S_IWUSR)) < 0)
      |                                                                              ^~~~~~~
cupsfilters/filter.c: In function 'cfFilterTee':
make[3]: *** [Makefile:1745: cupsfilters/libcupsfilters_la-testfilters.lo] Error 1
make[3]: *** Waiting for unfinished jobs....
cupsfilters/filter.c:352:48: error: 'S_IRUSR' undeclared (first use in this function)
  352 |     teefd = open(filename, O_CREAT | O_WRONLY, S_IRUSR | S_IWUSR);
      |                                                ^~~~~~~
cupsfilters/filter.c:352:48: note: each undeclared identifier is reported only once for each function it appears in
cupsfilters/filter.c:352:58: error: 'S_IWUSR' undeclared (first use in this function)
  352 |     teefd = open(filename, O_CREAT | O_WRONLY, S_IRUSR | S_IWUSR);
      |                                                          ^~~~~~~

There is sys/stat.h include missing for S_IRUSR.

Attaching patch to fix this issue. Please, consider merging it.

Thank you,
m.

stat.h.patch

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions