Summary: |
libbsd: missing include in test/strmode.c |
Product: |
libbsd
|
Reporter: |
Hanno Böck <hanno> |
Component: |
libbsd | Assignee: |
Guillem Jover <guillem> |
Status: |
RESOLVED
FIXED
|
QA Contact: |
|
Severity: |
normal
|
|
|
Priority: |
medium
|
|
|
Version: |
unspecified | |
|
Hardware: |
Other | |
|
OS: |
All | |
|
Whiteboard: |
|
i915 platform:
|
|
i915 features:
|
|
Attachments: |
patch to add missing include
|
Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.
Created attachment 121321 [details] patch to add missing include The test in test/strmode.c can fail to compile depending on the optimization flags used. The constants that are used in this file (S_IFREG etc.) come from the "sys/stat.h" include file. It seems gcc ignores this error if one compiles with "-O2" (default), but if one uses no optimization it fails. Add the missing include and it works all the time, see attached patch. Please apply. Reproduce: ./configure CFLAGS="" make make check Error: strmode.c: In function ‘main’: strmode.c:41:17: error: ‘S_IFREG’ undeclared (first use in this function) strmode(0777 | S_IFREG, mode_str); ^ strmode.c:41:17: note: each undeclared identifier is reported only once for each function it appears in strmode.c:44:27: error: ‘S_ISUID’ undeclared (first use in this function) strmode(0777 | S_IFREG | S_ISUID | S_ISGID | S_ISVTX, mode_str); ^ [...]