Skip to content

Commit

Permalink
lapi/mmap.h: Include <sys/mman.h>
Browse files Browse the repository at this point in the history
And remove it from tests which use lapi/mmap.h.
We prefer to include headers in lapi files, not in tests.

Signed-off-by: Petr Vorel <pvorel@suse.cz>
  • Loading branch information
pevik committed Mar 24, 2023
1 parent c392ef9 commit 32aa5c3
Show file tree
Hide file tree
Showing 10 changed files with 1 addition and 10 deletions.
1 change: 1 addition & 0 deletions include/lapi/mmap.h
Expand Up @@ -8,6 +8,7 @@
#define LAPI_MMAP_H__

#include "config.h"
#include <sys/mman.h>

#ifndef MAP_HUGETLB
# define MAP_HUGETLB 0x40000
Expand Down
1 change: 0 additions & 1 deletion testcases/kernel/io/direct_io/diotest4.c
Expand Up @@ -62,7 +62,6 @@
#include <sys/file.h>
#include <fcntl.h>
#include <sys/types.h>
#include <sys/mman.h>
#include <sys/syscall.h>
#include <errno.h>

Expand Down
1 change: 0 additions & 1 deletion testcases/kernel/mem/thp/thp03.c
Expand Up @@ -30,7 +30,6 @@
* corruption and no data corruption (nor userland nor kernel).
*/

#include <sys/mman.h>
#include <sys/types.h>
#include <sys/wait.h>
#include <fcntl.h>
Expand Down
2 changes: 0 additions & 2 deletions testcases/kernel/mem/thp/thp04.c
Expand Up @@ -26,8 +26,6 @@
* commit 8310d48b125d("huge_memory.c: respect FOLL_FORCE/FOLL_COW for thp").
*/

#include <sys/mman.h>

#include "tst_test.h"
#include "lapi/mmap.h"
#include "tst_fuzzy_sync.h"
Expand Down
1 change: 0 additions & 1 deletion testcases/kernel/numa/support_numa.c
Expand Up @@ -37,7 +37,6 @@
#include <string.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <sys/mman.h>
#include <fcntl.h>
#include "lapi/mmap.h"

Expand Down
1 change: 0 additions & 1 deletion testcases/kernel/syscalls/futex/futex_wake04.c
Expand Up @@ -21,7 +21,6 @@
*/

#include <stdio.h>
#include <sys/mman.h>
#include <fcntl.h>
#include <sys/time.h>
#include <string.h>
Expand Down
1 change: 0 additions & 1 deletion testcases/kernel/syscalls/madvise/madvise01.c
Expand Up @@ -11,7 +11,6 @@
*/

#include <sys/types.h>
#include <sys/mman.h>
#include <sys/stat.h>
#include <sys/mount.h>
#include <errno.h>
Expand Down
1 change: 0 additions & 1 deletion testcases/kernel/syscalls/madvise/madvise02.c
Expand Up @@ -30,7 +30,6 @@
*/

#include <sys/types.h>
#include <sys/mman.h>
#include <sys/resource.h>
#include <sys/stat.h>
#include <sys/time.h>
Expand Down
1 change: 0 additions & 1 deletion testcases/kernel/syscalls/madvise/madvise11.c
Expand Up @@ -22,7 +22,6 @@
#include <time.h>
#include <unistd.h>
#include <sys/types.h>
#include <sys/mman.h>
#include <sys/klog.h>

#include "tst_test.h"
Expand Down
1 change: 0 additions & 1 deletion testcases/kernel/syscalls/mmap/mmap17.c
Expand Up @@ -17,7 +17,6 @@
#include <stdio.h>
#include <fcntl.h>
#include <sys/types.h>
#include <sys/mman.h>
#include <sys/stat.h>
#include <unistd.h>
#include <errno.h>
Expand Down

0 comments on commit 32aa5c3

Please sign in to comment.