]> git.ipfire.org Git - thirdparty/libbsd.git/commitdiff
test: Add missing <sys/stat.h> include
authorHanno Boeck <hanno@hboeck.de>
Wed, 27 Jan 2016 14:06:50 +0000 (15:06 +0100)
committerGuillem Jover <guillem@hadrons.org>
Wed, 27 Jan 2016 14:24:39 +0000 (15:24 +0100)
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>
test/strmode.c

index 2584c27d6803afe1a595be872518106bd75d85c1..405ace108d31a7d2811331f20a65a390d3e65394 100644 (file)
@@ -24,6 +24,7 @@
  * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
 
+#include <sys/stat.h>
 #include <assert.h>
 #include <string.h>