Bug 2386537 - Missing <stdint.h> in <cmocka.h>
Summary: Missing <stdint.h> in <cmocka.h>
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Fedora
Classification: Fedora
Component: cmocka
Version: rawhide
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Andreas Schneider
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2025-08-05 13:57 UTC by Remi Collet
Modified: 2025-08-05 14:45 UTC (History)
1 user (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2025-08-05 14:45:51 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Remi Collet 2025-08-05 13:57:20 UTC
Description of problem:

cmaka.h uses uintpr_t which is defined in stdint.h
but which is not includes


Version-Release number of selected component (if applicable):
1.1.8-3.fc43

How reproducible:
This creates FTBFS in package using this library

Ex, see rhbz #2385622 (scl-utils)

I will add this include in scl-utils
but IMHO this is only a workaround, better to have it in the right place.

Comment 1 Fedora Update System 2025-08-05 14:19:07 UTC
FEDORA-2025-8c7e04d991 (scl-utils-2.0.3-6.fc43) has been submitted as an update to Fedora 43.
https://bodhi.fedoraproject.org/updates/FEDORA-2025-8c7e04d991

Comment 2 Fedora Update System 2025-08-05 14:22:18 UTC
FEDORA-2025-8c7e04d991 (scl-utils-2.0.3-6.fc43) has been pushed to the Fedora 43 stable repository.
If problem still persists, please make note of it in this bug report.

Comment 3 Andreas Schneider 2025-08-05 14:45:51 UTC
This is by intention, see https://api.cmocka.org/


#include <stdarg.h>
#include <stddef.h>
#include <stdint.h>
#include <setjmp.h>
#include <cmocka.h>
 
/* A test case that does nothing and succeeds. */
static void null_test_success(void **state) {
    (void) state; /* unused */
}
 
int main(void) {
    const struct CMUnitTest tests[] = {
        cmocka_unit_test(null_test_success),
    };
 
    return cmocka_run_group_tests(tests, NULL, NULL);
}


Note You need to log in before you can comment on or make changes to this bug.