]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
lib/compression: Include missing stat header file
authorAnoop C S <anoopcs@samba.org>
Mon, 5 Dec 2022 10:54:46 +0000 (16:24 +0530)
committerVolker Lendecke <vl@samba.org>
Tue, 6 Dec 2022 11:39:16 +0000 (11:39 +0000)
<sys/stat.h> was missing from compression library tests which resulted
in the following compile time error:

../../lib/compression/tests/test_lzx_huffman.c: In function
                                                   ‘datablob_from_file’:
../../lib/compression/tests/test_lzx_huffman.c:383:21: error:
                                         storage size of ‘s’ isn’t known
  383 |         struct stat s;
      |                     ^
../../lib/compression/tests/test_lzx_huffman.c:389:15: warning:
    implicit declaration of function ‘fstat’ [-Wimplicit-function-declaration]
  389 |         ret = fstat(fileno(fh), &s);
      |               ^~~~~

Signed-off-by: Anoop C S <anoopcs@samba.org>
Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Volker Lendecke <vl@samba.org>
Autobuild-User(master): Volker Lendecke <vl@samba.org>
Autobuild-Date(master): Tue Dec  6 11:39:16 UTC 2022 on sn-devel-184

lib/compression/tests/test_lzx_huffman.c
lib/compression/tests/test_lzxpress_plain.c

index da094555c2d713158db9d88a52953eb182ffe4ca..3a055183f7b5b835ab70d65270052df263861537 100644 (file)
@@ -27,6 +27,7 @@
 #include <setjmp.h>
 #include <cmocka.h>
 #include <stdbool.h>
+#include <sys/stat.h>
 #include "replace.h"
 #include <talloc.h>
 #include "lzxpress_huffman.h"
index 57130852fc977054120aae0874fd0fbd95de1e75..17e5a26207b01dc9fbce3aaa47b3bec2ed38d056 100644 (file)
@@ -21,6 +21,7 @@
 #include <stdarg.h>
 #include <stddef.h>
 #include <setjmp.h>
+#include <sys/stat.h>
 #include <cmocka.h>
 #include "includes.h"
 #include "talloc.h"