Skip to contentSkip to conversation

lapi: Add wordsize.h and use it

PATCH New Petr Vorel 2 participants 2 messages Mar 20, 2019 – Mar 21, 2019

lore
Share & tools
lore

Petr Vorel

author
#0 lore raw

PATCH 1/1 lapi: Add wordsize.h and use it

This fixes MUSL build, which defines __WORDSIZE in <sys/reg.h>.

---
Hi,

not sure if it's a good approach, Cyril suggested to implement it in include/lapi/abisize.h, so maybe my changes should be in abisize.h.

Kind regards,
Petr

PS: I found and fix this error independently and use different approach,
but first it was reported by Dengke Du in PR #177 [2] and
used in openembedded-core [3].
[1] https://github.com/linux-test-project/ltp/pull/177#discussion_r125466352
[2] https://github.com/linux-test-project/ltp/pull/177/commits/fd65412438526a28813fae403b6d3fb6ec605bde
[3] http://cgit.openembedded.org/openembedded-core/tree/meta/recipes-extended/ltp/ltp/0009-fix-redefinition-of-struct-msgbuf-error-building-wit.patch?h=sumo

---
 configure.ac                                    |  1 +
 include/lapi/abisize.h                          |  2 ++
 include/lapi/sync_file_range.h                  |  1 +
 include/lapi/wordsize.h                         | 17 +++++++++++++++++
 testcases/kernel/io/disktest/main.h             |  1 +
 .../kernel/mem/hugetlb/hugemmap/hugemmap02.c    |  1 +
 .../kernel/mem/hugetlb/hugemmap/hugemmap04.c    |  1 +
 .../kernel/mem/hugetlb/hugeshmat/hugeshmat02.c  |  1 +
 testcases/kernel/mem/mem/mem01.c                |  1 +
 testcases/kernel/mem/mtest01/mtest01.c          |  1 +
 testcases/kernel/mem/oom/oom01.c                |  1 +
 testcases/kernel/mem/oom/oom02.c                |  1 +
 testcases/kernel/mem/oom/oom03.c                |  1 +
 testcases/kernel/mem/oom/oom04.c                |  1 +
 testcases/kernel/mem/oom/oom05.c                |  1 +
 testcases/kernel/mem/swapping/swapping01.c      |  1 +
 testcases/kernel/mem/tunable/min_free_kbytes.c  |  1 +
 .../kernel/mem/tunable/overcommit_memory.c      |  1 +
 testcases/kernel/mem/vma/vma03.c                |  1 +
 .../kernel/syscalls/fadvise/posix_fadvise03.c   |  1 +
 .../kernel/syscalls/fallocate/fallocate02.c     |  1 +
 testcases/kernel/syscalls/fcntl/fcntl_common.h  |  1 +
 testcases/kernel/syscalls/fork/fork14.c         |  1 +
 testcases/kernel/syscalls/ipc/msgrcv/msgrcv08.c |  1 +
 testcases/kernel/syscalls/mmap/mmap15.c         |  1 +
 testcases/kernel/syscalls/profil/profil01.c     |  1 +
 testcases/kernel/syscalls/sbrk/sbrk03.c         |  1 +
 testcases/kernel/syscalls/sendfile/sendfile09.c |  1 +
 28 files changed, 45 insertions(+)
 create mode 100644 include/lapi/wordsize.h
configure.ac +1 -0
index e73f7d92e..08128e13d 100644
@@ -33,6 +33,7 @@ AC_PROG_YACC
 AC_PREFIX_DEFAULT(/opt/ltp)
 
 AC_CHECK_HEADERS([ \
+    bits/wordsize.h \
     ifaddrs.h \
     keyutils.h \
     linux/can.h \
include/lapi/abisize.h +2 -0
index 897bdfdb6..ae28021d1 100644
@@ -20,6 +20,8 @@
 #ifndef ABISIZE_H__
 #define ABISIZE_H__
 
+#include "lapi/wordsize.h"
+
 /*
  * Determines if we have to split up 64 bit arguments or not
  *
include/lapi/sync_file_range.h +1 -0
index e2d35fcfd..affbb3974 100644
@@ -9,6 +9,7 @@
 #include <sys/types.h>
 #include "config.h"
 #include "lapi/syscalls.h"
+#include "lapi/wordsize.h"
 
 #if !defined(HAVE_SYNC_FILE_RANGE)
 
include/lapi/wordsize.h new file +17 -0
new file mode 100644
index 000000000..a3e1ba36d
@@ -0,0 +1,17 @@
+// SPDX-License-Identifier: GPL-2.0-or-later
+/*
+ * Copyright (c) 2019 Petr Vorel <[email protected]>
+ */
+
+#ifndef WORDSIZE_H__
+#define WORDSIZE_H__
+
+#ifdef HAVE_BITS_WORDSIZE_H
+# include <bits/wordsize.h>
+#endif
+
+#ifndef __WORDSIZE
+# include <sys/reg.h>
+#endif
+
+#endif /* WORDSIZE_H__ */
testcases/kernel/io/disktest/main.h +1 -0
index 41fcd7315..9b619aeb7 100644
@@ -49,6 +49,7 @@
 #include <time.h>
 #include <errno.h>
 #include "defs.h"
+#include "lapi/wordsize.h"
 
 #define VER_STR "v1.4.2"
 #define BLKGETSIZE _IO(0x12,96)		/* IOCTL for getting the device size */
testcases/kernel/mem/hugetlb/hugemmap/hugemmap02.c +1 -0
index 0be753e0d..6c3defc6a 100644
@@ -39,6 +39,7 @@
 #include <sys/mount.h>
 #include <limits.h>
 #include <sys/param.h>
+#include "lapi/wordsize.h"
 #include "hugetlb.h"
 
 #define LOW_ADDR       0x80000000
testcases/kernel/mem/hugetlb/hugemmap/hugemmap04.c +1 -0
index 674d367a4..074efc243 100644
@@ -38,6 +38,7 @@
 #include <stdio.h>
 #include <limits.h>
 #include <sys/param.h>
+#include "lapi/wordsize.h"
 #include "hugetlb.h"
 
 static struct tst_option options[] = {
testcases/kernel/mem/hugetlb/hugeshmat/hugeshmat02.c +1 -0
index 1c2c978c8..d75e2ea59 100644
@@ -36,6 +36,7 @@
 
 #include <pwd.h>
 #include <limits.h>
+#include "lapi/wordsize.h"
 #include "hugetlb.h"
 
 #if __WORDSIZE == 64
testcases/kernel/mem/mem/mem01.c +1 -0
index f7642ab24..46d2feed0 100644
@@ -39,6 +39,7 @@
 #include <time.h>
 #include <limits.h>
 
+#include "lapi/wordsize.h"
 #include "test.h"
 
 /* in KB */
testcases/kernel/mem/mtest01/mtest01.c +1 -0
index df038f50d..d08b9b536 100644
@@ -28,6 +28,7 @@
 #include <stdlib.h>
 #include <unistd.h>
 
+#include "lapi/wordsize.h"
 #include "tst_test.h"
 
 #define FIVE_HUNDRED_MB         (500ULL*1024*1024)
testcases/kernel/mem/oom/oom01.c +1 -0
index beb232d45..3ca537144 100644
@@ -27,6 +27,7 @@
 #include <stdio.h>
 #include <stdlib.h>
 #include <unistd.h>
+#include "lapi/wordsize.h"
 #include "mem.h"
 
 static void verify_oom(void)
testcases/kernel/mem/oom/oom02.c +1 -0
index 866540def..c893b98d0 100644
@@ -30,6 +30,7 @@
 #include <numa.h>
 #endif
 
+#include "lapi/wordsize.h"
 #include "numa_helper.h"
 #include "mem.h"
 
testcases/kernel/mem/oom/oom03.c +1 -0
index b283b5275..978a414af 100644
@@ -30,6 +30,7 @@
 #include <numa.h>
 #endif
 
+#include "lapi/wordsize.h"
 #include "numa_helper.h"
 #include "mem.h"
 
testcases/kernel/mem/oom/oom04.c +1 -0
index 98b31c74a..c17f4e3da 100644
@@ -30,6 +30,7 @@
 #include <numa.h>
 #endif
 
+#include "lapi/wordsize.h"
 #include "numa_helper.h"
 #include "mem.h"
 
testcases/kernel/mem/oom/oom05.c +1 -0
index c5395b0bb..7a77b590b 100644
@@ -30,6 +30,7 @@
 #include <numa.h>
 #endif
 
+#include "lapi/wordsize.h"
 #include "numa_helper.h"
 #include "mem.h"
 
testcases/kernel/mem/swapping/swapping01.c +1 -0
index 6ac802b25..07109c80a 100644
@@ -44,6 +44,7 @@
 #include <stdlib.h>
 #include <string.h>
 #include <unistd.h>
+#include "lapi/wordsize.h"
 #include "mem.h"
 
 /* allow swapping 1 * phy_mem in maximum */
testcases/kernel/mem/tunable/min_free_kbytes.c +1 -0
index f114dc493..aae3f00cc 100644
@@ -34,6 +34,7 @@
 #include <signal.h>
 #include <stdio.h>
 #include <stdlib.h>
+#include "lapi/wordsize.h"
 #include "mem.h"
 
 #define MAP_SIZE (1UL<<20)
testcases/kernel/mem/tunable/overcommit_memory.c +1 -0
index 07f824328..0712ff760 100644
@@ -69,6 +69,7 @@
 #include <stdio.h>
 #include <stdlib.h>
 #include <limits.h>
+#include "lapi/wordsize.h"
 #include "mem.h"
 
 #define DEFAULT_OVER_RATIO	50L
testcases/kernel/mem/vma/vma03.c +1 -0
index 4b34ab0a0..42e233412 100644
@@ -51,6 +51,7 @@
 #include "test.h"
 #include "safe_macros.h"
 #include "tst_kernel.h"
+#include "lapi/wordsize.h"
 
 char *TCID = "vma03";
 int TST_TOTAL = 1;
testcases/kernel/syscalls/fadvise/posix_fadvise03.c +1 -0
index 0127a1b04..ad65870d1 100644
@@ -30,6 +30,7 @@
 
 #include "tst_test.h"
 #include "lapi/syscalls.h"
+#include "lapi/wordsize.h"
 
 char fname[] = "/bin/cat";	/* test executable to open */
 int fd = -1;			/* initialized in open */
testcases/kernel/syscalls/fallocate/fallocate02.c +1 -0
index 4840eaf28..df5ae217e 100644
@@ -41,6 +41,7 @@
 #include "test.h"
 #include "safe_macros.h"
 #include "lapi/fallocate.h"
+#include "lapi/wordsize.h"
 
 #define BLOCKS_WRITTEN		12
 #ifdef TEST_DEFAULT
testcases/kernel/syscalls/fcntl/fcntl_common.h +1 -0
index 07229a0f8..7738a5258 100644
@@ -1,4 +1,5 @@
 #include "lapi/syscalls.h"
+#include "lapi/wordsize.h"
 
 /*
  * glibc commit:
testcases/kernel/syscalls/fork/fork14.c +1 -0
index 6ea92e0c2..c660f6a4e 100644
@@ -35,6 +35,7 @@
 #include <unistd.h>
 #include "test.h"
 #include "safe_macros.h"
+#include "lapi/wordsize.h"
 
 char *TCID = "fork14";
 int TST_TOTAL = 1;
testcases/kernel/syscalls/ipc/msgrcv/msgrcv08.c +1 -0
index a757c0d18..2e500ce23 100644
@@ -42,6 +42,7 @@
 #include <sys/ipc.h>
 #include <sys/msg.h>
 #include "test.h"
+#include "lapi/wordsize.h"
 
 const char *TCID = "msgrcv08";
 const int TST_TOTAL = 1;
testcases/kernel/syscalls/mmap/mmap15.c +1 -0
index c8a77873a..db5e30bd1 100644
@@ -36,6 +36,7 @@
 #include <unistd.h>
 #include "test.h"
 #include "safe_macros.h"
+#include "lapi/wordsize.h"
 
 char *TCID = "mmap15";
 int TST_TOTAL = 1;
testcases/kernel/syscalls/profil/profil01.c +1 -0
index f1164021b..1958e1fa4 100644
@@ -27,6 +27,7 @@
 #include <sys/types.h>
 #include "test.h"
 #include "safe_macros.h"
+#include "lapi/wordsize.h"
 #include "config.h"
 
 char *TCID = "profil01";
testcases/kernel/syscalls/sbrk/sbrk03.c +1 -0
index 46fb2d111..5196c3a57 100644
@@ -46,6 +46,7 @@
 
 #include <stdio.h>
 #include <unistd.h>
+#include "lapi/wordsize.h"
 #include "tst_test.h"
 
 static void sbrk_test(void)
testcases/kernel/syscalls/sendfile/sendfile09.c +1 -0
index 0a9d2553e..4be3065d0 100644
@@ -51,6 +51,7 @@
 #include <inttypes.h>
 #include "test.h"
 #include "safe_macros.h"
+#include "lapi/wordsize.h"
 
 #ifndef OFF_T
 #define OFF_T off_t
Signature · 1 line
2.21.0
#1 lore raw

PATCH 1/1 lapi: Add wordsize.h and use it

Hi!

Quoted 2 lines

not sure if it's a good approach, Cyril suggested to implement it in include/lapi/abisize.h, so maybe my changes should be in abisize.h.

Maybe we should use __LP64__ instead.

But I guess that the safest option would be defining new constants somewhere in lapi/abisize.h that could be then used in tests.

Something as:

#ifdef __LP64__

# define TST_ABI64
#else
# define TST_ABI32
#endif
Quoted 388 lines

PS: I found and fix this error independently and use different approach,
but first it was reported by Dengke Du in PR #177 [2] and
used in openembedded-core [3].
[1] https://github.com/linux-test-project/ltp/pull/177#discussion_r125466352
[2] https://github.com/linux-test-project/ltp/pull/177/commits/fd65412438526a28813fae403b6d3fb6ec605bde
[3] http://cgit.openembedded.org/openembedded-core/tree/meta/recipes-extended/ltp/ltp/0009-fix-redefinition-of-struct-msgbuf-error-building-wit.patch?h=sumo

---
 configure.ac                                    |  1 +
 include/lapi/abisize.h                          |  2 ++
 include/lapi/sync_file_range.h                  |  1 +
 include/lapi/wordsize.h                         | 17 +++++++++++++++++
 testcases/kernel/io/disktest/main.h             |  1 +
 .../kernel/mem/hugetlb/hugemmap/hugemmap02.c    |  1 +
 .../kernel/mem/hugetlb/hugemmap/hugemmap04.c    |  1 +
 .../kernel/mem/hugetlb/hugeshmat/hugeshmat02.c  |  1 +
 testcases/kernel/mem/mem/mem01.c                |  1 +
 testcases/kernel/mem/mtest01/mtest01.c          |  1 +
 testcases/kernel/mem/oom/oom01.c                |  1 +
 testcases/kernel/mem/oom/oom02.c                |  1 +
 testcases/kernel/mem/oom/oom03.c                |  1 +
 testcases/kernel/mem/oom/oom04.c                |  1 +
 testcases/kernel/mem/oom/oom05.c                |  1 +
 testcases/kernel/mem/swapping/swapping01.c      |  1 +
 testcases/kernel/mem/tunable/min_free_kbytes.c  |  1 +
 .../kernel/mem/tunable/overcommit_memory.c      |  1 +
 testcases/kernel/mem/vma/vma03.c                |  1 +
 .../kernel/syscalls/fadvise/posix_fadvise03.c   |  1 +
 .../kernel/syscalls/fallocate/fallocate02.c     |  1 +
 testcases/kernel/syscalls/fcntl/fcntl_common.h  |  1 +
 testcases/kernel/syscalls/fork/fork14.c         |  1 +
 testcases/kernel/syscalls/ipc/msgrcv/msgrcv08.c |  1 +
 testcases/kernel/syscalls/mmap/mmap15.c         |  1 +
 testcases/kernel/syscalls/profil/profil01.c     |  1 +
 testcases/kernel/syscalls/sbrk/sbrk03.c         |  1 +
 testcases/kernel/syscalls/sendfile/sendfile09.c |  1 +
 28 files changed, 45 insertions(+)
 create mode 100644 include/lapi/wordsize.h
configure.ac +1 -0
index e73f7d92e..08128e13d 100644
@@ -33,6 +33,7 @@ AC_PROG_YACC
 AC_PREFIX_DEFAULT(/opt/ltp)
 
 AC_CHECK_HEADERS([ \
+    bits/wordsize.h \
     ifaddrs.h \
     keyutils.h \
     linux/can.h \
include/lapi/abisize.h +2 -0
index 897bdfdb6..ae28021d1 100644
@@ -20,6 +20,8 @@
 #ifndef ABISIZE_H__
 #define ABISIZE_H__
 
+#include "lapi/wordsize.h"
+
 /*
  * Determines if we have to split up 64 bit arguments or not
  *
include/lapi/sync_file_range.h +1 -0
index e2d35fcfd..affbb3974 100644
@@ -9,6 +9,7 @@
 #include <sys/types.h>
 #include "config.h"
 #include "lapi/syscalls.h"
+#include "lapi/wordsize.h"
 
 #if !defined(HAVE_SYNC_FILE_RANGE)
 
include/lapi/wordsize.h new file +17 -0
new file mode 100644
index 000000000..a3e1ba36d
@@ -0,0 +1,17 @@
+// SPDX-License-Identifier: GPL-2.0-or-later
+/*
+ * Copyright (c) 2019 Petr Vorel <[email protected]>
+ */
+
+#ifndef WORDSIZE_H__
+#define WORDSIZE_H__
+
+#ifdef HAVE_BITS_WORDSIZE_H
+# include <bits/wordsize.h>
+#endif
+
+#ifndef __WORDSIZE
+# include <sys/reg.h>
+#endif
+
+#endif /* WORDSIZE_H__ */
testcases/kernel/io/disktest/main.h +1 -0
index 41fcd7315..9b619aeb7 100644
@@ -49,6 +49,7 @@
 #include <time.h>
 #include <errno.h>
 #include "defs.h"
+#include "lapi/wordsize.h"
 
 #define VER_STR "v1.4.2"
 #define BLKGETSIZE _IO(0x12,96)		/* IOCTL for getting the device size */
testcases/kernel/mem/hugetlb/hugemmap/hugemmap02.c +1 -0
index 0be753e0d..6c3defc6a 100644
@@ -39,6 +39,7 @@
 #include <sys/mount.h>
 #include <limits.h>
 #include <sys/param.h>
+#include "lapi/wordsize.h"
 #include "hugetlb.h"
 
 #define LOW_ADDR       0x80000000
testcases/kernel/mem/hugetlb/hugemmap/hugemmap04.c +1 -0
index 674d367a4..074efc243 100644
@@ -38,6 +38,7 @@
 #include <stdio.h>
 #include <limits.h>
 #include <sys/param.h>
+#include "lapi/wordsize.h"
 #include "hugetlb.h"
 
 static struct tst_option options[] = {
testcases/kernel/mem/hugetlb/hugeshmat/hugeshmat02.c +1 -0
index 1c2c978c8..d75e2ea59 100644
@@ -36,6 +36,7 @@
 
 #include <pwd.h>
 #include <limits.h>
+#include "lapi/wordsize.h"
 #include "hugetlb.h"
 
 #if __WORDSIZE == 64
testcases/kernel/mem/mem/mem01.c +1 -0
index f7642ab24..46d2feed0 100644
@@ -39,6 +39,7 @@
 #include <time.h>
 #include <limits.h>
 
+#include "lapi/wordsize.h"
 #include "test.h"
 
 /* in KB */
testcases/kernel/mem/mtest01/mtest01.c +1 -0
index df038f50d..d08b9b536 100644
@@ -28,6 +28,7 @@
 #include <stdlib.h>
 #include <unistd.h>
 
+#include "lapi/wordsize.h"
 #include "tst_test.h"
 
 #define FIVE_HUNDRED_MB         (500ULL*1024*1024)
testcases/kernel/mem/oom/oom01.c +1 -0
index beb232d45..3ca537144 100644
@@ -27,6 +27,7 @@
 #include <stdio.h>
 #include <stdlib.h>
 #include <unistd.h>
+#include "lapi/wordsize.h"
 #include "mem.h"
 
 static void verify_oom(void)
testcases/kernel/mem/oom/oom02.c +1 -0
index 866540def..c893b98d0 100644
@@ -30,6 +30,7 @@
 #include <numa.h>
 #endif
 
+#include "lapi/wordsize.h"
 #include "numa_helper.h"
 #include "mem.h"
 
testcases/kernel/mem/oom/oom03.c +1 -0
index b283b5275..978a414af 100644
@@ -30,6 +30,7 @@
 #include <numa.h>
 #endif
 
+#include "lapi/wordsize.h"
 #include "numa_helper.h"
 #include "mem.h"
 
testcases/kernel/mem/oom/oom04.c +1 -0
index 98b31c74a..c17f4e3da 100644
@@ -30,6 +30,7 @@
 #include <numa.h>
 #endif
 
+#include "lapi/wordsize.h"
 #include "numa_helper.h"
 #include "mem.h"
 
testcases/kernel/mem/oom/oom05.c +1 -0
index c5395b0bb..7a77b590b 100644
@@ -30,6 +30,7 @@
 #include <numa.h>
 #endif
 
+#include "lapi/wordsize.h"
 #include "numa_helper.h"
 #include "mem.h"
 
testcases/kernel/mem/swapping/swapping01.c +1 -0
index 6ac802b25..07109c80a 100644
@@ -44,6 +44,7 @@
 #include <stdlib.h>
 #include <string.h>
 #include <unistd.h>
+#include "lapi/wordsize.h"
 #include "mem.h"
 
 /* allow swapping 1 * phy_mem in maximum */
testcases/kernel/mem/tunable/min_free_kbytes.c +1 -0
index f114dc493..aae3f00cc 100644
@@ -34,6 +34,7 @@
 #include <signal.h>
 #include <stdio.h>
 #include <stdlib.h>
+#include "lapi/wordsize.h"
 #include "mem.h"
 
 #define MAP_SIZE (1UL<<20)
testcases/kernel/mem/tunable/overcommit_memory.c +1 -0
index 07f824328..0712ff760 100644
@@ -69,6 +69,7 @@
 #include <stdio.h>
 #include <stdlib.h>
 #include <limits.h>
+#include "lapi/wordsize.h"
 #include "mem.h"
 
 #define DEFAULT_OVER_RATIO	50L
testcases/kernel/mem/vma/vma03.c +1 -0
index 4b34ab0a0..42e233412 100644
@@ -51,6 +51,7 @@
 #include "test.h"
 #include "safe_macros.h"
 #include "tst_kernel.h"
+#include "lapi/wordsize.h"
 
 char *TCID = "vma03";
 int TST_TOTAL = 1;
testcases/kernel/syscalls/fadvise/posix_fadvise03.c +1 -0
index 0127a1b04..ad65870d1 100644
@@ -30,6 +30,7 @@
 
 #include "tst_test.h"
 #include "lapi/syscalls.h"
+#include "lapi/wordsize.h"
 
 char fname[] = "/bin/cat";	/* test executable to open */
 int fd = -1;			/* initialized in open */
testcases/kernel/syscalls/fallocate/fallocate02.c +1 -0
index 4840eaf28..df5ae217e 100644
@@ -41,6 +41,7 @@
 #include "test.h"
 #include "safe_macros.h"
 #include "lapi/fallocate.h"
+#include "lapi/wordsize.h"
 
 #define BLOCKS_WRITTEN		12
 #ifdef TEST_DEFAULT
testcases/kernel/syscalls/fcntl/fcntl_common.h +1 -0
index 07229a0f8..7738a5258 100644
@@ -1,4 +1,5 @@
 #include "lapi/syscalls.h"
+#include "lapi/wordsize.h"
 
 /*
  * glibc commit:
testcases/kernel/syscalls/fork/fork14.c +1 -0
index 6ea92e0c2..c660f6a4e 100644
@@ -35,6 +35,7 @@
 #include <unistd.h>
 #include "test.h"
 #include "safe_macros.h"
+#include "lapi/wordsize.h"
 
 char *TCID = "fork14";
 int TST_TOTAL = 1;
testcases/kernel/syscalls/ipc/msgrcv/msgrcv08.c +1 -0
index a757c0d18..2e500ce23 100644
@@ -42,6 +42,7 @@
 #include <sys/ipc.h>
 #include <sys/msg.h>
 #include "test.h"
+#include "lapi/wordsize.h"
 
 const char *TCID = "msgrcv08";
 const int TST_TOTAL = 1;
testcases/kernel/syscalls/mmap/mmap15.c +1 -0
index c8a77873a..db5e30bd1 100644
@@ -36,6 +36,7 @@
 #include <unistd.h>
 #include "test.h"
 #include "safe_macros.h"
+#include "lapi/wordsize.h"
 
 char *TCID = "mmap15";
 int TST_TOTAL = 1;
testcases/kernel/syscalls/profil/profil01.c +1 -0
index f1164021b..1958e1fa4 100644
@@ -27,6 +27,7 @@
 #include <sys/types.h>
 #include "test.h"
 #include "safe_macros.h"
+#include "lapi/wordsize.h"
 #include "config.h"
 
 char *TCID = "profil01";
testcases/kernel/syscalls/sbrk/sbrk03.c +1 -0
index 46fb2d111..5196c3a57 100644
@@ -46,6 +46,7 @@
 
 #include <stdio.h>
 #include <unistd.h>
+#include "lapi/wordsize.h"
 #include "tst_test.h"
 
 static void sbrk_test(void)
testcases/kernel/syscalls/sendfile/sendfile09.c +1 -0
index 0a9d2553e..4be3065d0 100644
@@ -51,6 +51,7 @@
 #include <inttypes.h>
 #include "test.h"
 #include "safe_macros.h"
+#include "lapi/wordsize.h"
 
 #ifndef OFF_T
 #define OFF_T off_t
Signature · 1 line
2.21.0
Signature · 2 lines
Cyril Hrubis
[email protected]