Skip to content
This repository was archived by the owner on Aug 13, 2025. It is now read-only.

Commit 78afc0b

Browse files
committed
Include <inttypes.h> whenever including <cmocka.h>
Development versions of cmocka require the intmax_t and uintmax_t types to be defined by the time the test code includes the <cmocka.h> header. These types are defined in the <stdint.h> header, which is included by the <inttypes.h> header, which in turn is already explicitly included by some of the programs in the tests/ directory. Ensure all programs in that directory that include the <cmocka.h> header also include the <inttypes.h> header to future-proof the code while keeping the change set minimal and the resulting code consistent. Also prevent explicitly including the <stdint.h> header in those programs as it is included by the <inttypes.h> header. (cherry picked from commit c2dcd05)
1 parent c65a405 commit 78afc0b

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

51 files changed

+51
-1
lines changed

tests/dns/acl_test.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
* information regarding copyright ownership.
1212
*/
1313

14+
#include <inttypes.h>
1415
#include <sched.h> /* IWYU pragma: keep */
1516
#include <setjmp.h>
1617
#include <stdarg.h>

tests/dns/db_test.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
* information regarding copyright ownership.
1212
*/
1313

14+
#include <inttypes.h>
1415
#include <sched.h> /* IWYU pragma: keep */
1516
#include <setjmp.h>
1617
#include <stdarg.h>

tests/dns/dbdiff_test.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
* information regarding copyright ownership.
1212
*/
1313

14+
#include <inttypes.h>
1415
#include <sched.h> /* IWYU pragma: keep */
1516
#include <setjmp.h>
1617
#include <stdarg.h>

tests/dns/dbiterator_test.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
* information regarding copyright ownership.
1212
*/
1313

14+
#include <inttypes.h>
1415
#include <sched.h> /* IWYU pragma: keep */
1516
#include <setjmp.h>
1617
#include <stdarg.h>

tests/dns/dbversion_test.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
* information regarding copyright ownership.
1212
*/
1313

14+
#include <inttypes.h>
1415
#include <sched.h> /* IWYU pragma: keep */
1516
#include <setjmp.h>
1617
#include <stdarg.h>

tests/dns/dh_test.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
* information regarding copyright ownership.
1212
*/
1313

14+
#include <inttypes.h>
1415
#include <sched.h> /* IWYU pragma: keep */
1516
#include <setjmp.h>
1617
#include <stdarg.h>

tests/dns/dns64_test.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
* information regarding copyright ownership.
1212
*/
1313

14+
#include <inttypes.h>
1415
#include <sched.h> /* IWYU pragma: keep */
1516
#include <setjmp.h>
1617
#include <stdarg.h>

tests/dns/dst_test.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
* information regarding copyright ownership.
1212
*/
1313

14+
#include <inttypes.h>
1415
#include <sched.h> /* IWYU pragma: keep */
1516
#include <setjmp.h>
1617
#include <stdarg.h>

tests/dns/geoip_test.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
* information regarding copyright ownership.
1212
*/
1313

14+
#include <inttypes.h>
1415
#include <sched.h> /* IWYU pragma: keep */
1516
#include <setjmp.h>
1617
#include <stdarg.h>

tests/dns/master_test.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
* information regarding copyright ownership.
1212
*/
1313

14+
#include <inttypes.h>
1415
#include <sched.h> /* IWYU pragma: keep */
1516
#include <setjmp.h>
1617
#include <stdarg.h>

0 commit comments

Comments
 (0)