Commit 008316aa291e0930eba067ed7b0772d0009813b0

Hanno Boeck 2016-01-27T15:06:50

test: Add missing <sys/stat.h> 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. Fixes: https://bugs.freedesktop.org/show_bug.cgi?id=93880 Signed-off-by: Guillem Jover <guillem@hadrons.org>

1
2
3
4
5
6
7
8
9
10
11
12
diff --git a/test/strmode.c b/test/strmode.c
index 2584c27..405ace1 100644
--- a/test/strmode.c
+++ b/test/strmode.c
@@ -24,6 +24,7 @@
  * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
 
+#include <sys/stat.h>
 #include <assert.h>
 #include <string.h>