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

gcc failed during compilation #484

Open
janus opened this issue Jun 20, 2018 · 1 comment
Open

gcc failed during compilation #484

janus opened this issue Jun 20, 2018 · 1 comment

Comments

@janus
Copy link

janus commented Jun 20, 2018

Got the below message error message .
gcc --version
gcc (Ubuntu 5.4.0-6ubuntu1~16.04.9) 5.4.0 20160609

gcc -c -I/build/include -Iinclude -Imodules -DPICO_COMPILE_TIME=date +%s` -Wall -W -Wextra -Wshadow -Wcast-qual -Wwrite-strings -Wundef -Wdeclaration-after-statement -Wconversion -Wcast-align -Wmissing-prototypes -Wno-missing-field-initializers -ggdb -o modules/pico_icmp4.o modules/pico_icmp4.c
In file included from modules/pico_icmp4.c:11:0:
modules/pico_icmp4.h:152:41: error: expected identifier or ‘(’ before ‘-’ token

define pico_icmp4_packet_filtered(f) (-1)

                                     ^

modules/pico_icmp4.c:179:5: note: in expansion of macro ‘pico_icmp4_packet_filtered’
int pico_icmp4_packet_filtered(struct pico_frame *f)
^
modules/pico_icmp4.h:153:42: error: expected identifier or ‘(’ before ‘-’ token

define pico_icmp4_param_problem(f, c) (-1)

                                      ^

`

@janus
Copy link
Author

janus commented Jun 21, 2018

The below solved this issue ... I got it from lang.c group(Ben) ..
`
#ifdef PICO_SUPPORT_ICMP4
int pico_fn_icmp4_packet_filtered(struct pico_frame *f);
int pico_fn_icmp4_param_problem(struct pico_frame *f, uint8_t code);

define pico_icmp4_packet_filtered(f) pico_fn_icmp4_packet_filtered(f)

define pico_icmp4_param_problem(f, c) pico_fn_icmp4_param_problem(f, c)

#else

define pico_icmp4_packet_filtered(f) (-1)

define pico_icmp4_param_problem(f, c) (-1)

#endif /* PICO_SUPPORT_ICMP4 */

`

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

No branches or pull requests

1 participant