Skip to content

Compilation fails when ATCA_USE_SHARED_MUTEX is off #353

@jens-f

Description

@jens-f

When ATCA_USE_SHARED_MUTEX is not set in CMakelist, the compilation fails with

lib/hal/hal_linux.c:292:13: error: conflicting types for 'hal_create_mutex'
ATCA_STATUS hal_create_mutex(void ** ppMutex, char* pName)
            ^
lib/hal/atca_hal.h:245:13: note: previous declaration is here
ATCA_STATUS hal_create_mutex(void ** ppMutex, const char* pName);
            ^

This is caused by https://github.com/MicrochipTech/cryptoauthlib/blob/main/lib/hal/hal_linux.c#L292
missing the const definition:

ATCA_STATUS hal_create_mutex(void ** ppMutex, char* pName)

needs to be:

ATCA_STATUS hal_create_mutex(void ** ppMutex, const char* pName)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions