Skip to content

Build failure on macOS #8642

Description

@masaori335
../include/tscpp/util/TsSharedMutex.h:62:14: error: incompatible integer to pointer conversion assigning to 'const char *' from 'int'
    _c_str = strerror_r(err_num, _buf, 256);
             ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

It looks like macOS has POSIX version strerror_r only.

STRERROR(3)                                                Library Functions Manual                                                STRERROR(3)

NAME
     perror, strerror, strerror_r, sys_errlist, sys_nerr – system error messages

LIBRARY
     Standard C Library (libc, -lc)

SYNOPSIS
...
     int
     strerror_r(int errnum, char *strerrbuf, size_t buflen);
...
STANDARDS
     The perror() and strerror() functions conform to ISO/IEC 9899:1999 (“ISO C99”).  The strerror_r() function conforms to IEEE Std
     1003.1-2001 (“POSIX.1”).     

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Buildwork related to build configuration or environmentmacOS

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions