Skip to content

fmadio_packet.h does not compile with C++ #7

@arghness

Description

@arghness

Tested with gcc-14.2.1 on Rocky 9.6.

I wrapped the fmadio_packet.h header with the required dependencies and disabled warnings:

#include <assert.h>
#include <errno.h>
#include <fcntl.h>
#include <stdio.h>
#include <string.h>
#include <sys/mman.h>
#include <sys/stat.h>
#include <unistd.h>

#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wignored-qualifiers"
#pragma GCC diagnostic ignored "-Wsign-compare"
#pragma GCC diagnostic ignored "-Wunused-parameter"
#pragma GCC diagnostic ignored "-Wvolatile"

#include "fmadio_packet.h"

#pragma GCC diagnostic pop

However, there were still issues that couldn't be fixed from the command line, missing casts and implicit conversions from u8* to char* which are not allowed in C++.

I put together an example fix in #6 which worked for me.

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