Skip to content

does not compile on OSX #47

@antonmeyer

Description

@antonmeyer

make OSX=1 results in
main.c:328:6: warning: logical not is only applied to the left hand side of this comparison [-Wlogical-not-parentheses]
if (!conf.serveraddr[0] != '\0' && filter_packet(p)) {
^ ~~
main.c:328:6: note: add parentheses after the '!' to evaluate the comparison first
if (!conf.serveraddr[0] != '\0' && filter_packet(p)) {
^
( )
main.c:328:6: note: add parentheses around left hand side expression to silence this warning
if (!conf.serveraddr[0] != '\0' && filter_packet(p)) {
^
( )
main.c:495:6: warning: logical not is only applied to the left hand side of this comparison [-Wlogical-not-parentheses]
if (!conf.serveraddr[0] != '\0') {
^ ~~
main.c:495:6: note: add parentheses after the '!' to evaluate the comparison first
if (!conf.serveraddr[0] != '\0') {
^
( )
main.c:495:6: note: add parentheses around left hand side expression to silence this warning
if (!conf.serveraddr[0] != '\0') {
^
( )
main.c:637:2: warning: implicit declaration of function 'clock_gettime' is invalid in C99 [-Wimplicit-function-declaration]
clock_gettime(CLOCK_MONOTONIC, &stats.stats_time);
^
main.c:637:16: error: use of undeclared identifier 'CLOCK_MONOTONIC'
clock_gettime(CLOCK_MONOTONIC, &stats.stats_time);
^
main.c:638:16: error: use of undeclared identifier 'CLOCK_MONOTONIC'
clock_gettime(CLOCK_MONOTONIC, &the_time);
^
main.c:723:17: error: use of undeclared identifier 'CLOCK_MONOTONIC'
clock_gettime(CLOCK_MONOTONIC, &the_time);
^
main.c:760:16: error: use of undeclared identifier 'CLOCK_MONOTONIC'
clock_gettime(CLOCK_MONOTONIC, &stats.stats_time);
^
3 warnings and 4 errors generated.
make: *** [main.o] Error 1

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions