Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Miscellaneous build fixes #145

Open
wants to merge 5 commits into
base: master
Choose a base branch
from
Open

Conversation

emaste
Copy link

@emaste emaste commented Jul 6, 2020

Attempting to compile on FreeBSD 13 with Clang and libc++ resulted in:

etherport.cpp:75:58: error: invalid operands to binary expression
('__bind<int &, sockaddr *, unsigned long>' and 'int')
if (bind(m_sock, (struct sockaddr *) &sin, sizeof(sin)) < 0)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^ ~

Attempting to compile on FreeBSD 13 with Clang and libc++ resulted in:

etherport.cpp:75:58: error: invalid operands to binary expression
    ('__bind<int &, sockaddr *, unsigned long>' and 'int')
        if (bind(m_sock, (struct sockaddr *) &sin, sizeof(sin)) < 0)
            ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^ ~
@emaste emaste changed the title fix compilation with libc++ Miscellaneous build fixes Jul 6, 2020
@emaste
Copy link
Author

emaste commented Jul 6, 2020

First commit is a build fix when libc++ (rather than libstdc++) is used, now pushed a second commit to clean up/refactor build.sh somewhat, as part of my effort to build on FreeBSD.

All three build cases executed `apt-get install libmosquitto-dev`, and
all three g++ invocations were identical expcept for -D defines or -m32.
The SIOCGIFHWADDR ioctl is Linux-specific.  load_hardware_mac already
implements a software MAC address fallback, so just rely on that on
FreeBSD for now.  A real implementation can be provided later.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant