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

compiler error on debian 8.2 #1

Open
ovidiusas opened this issue Dec 19, 2015 · 1 comment
Open

compiler error on debian 8.2 #1

ovidiusas opened this issue Dec 19, 2015 · 1 comment

Comments

@ovidiusas
Copy link

make[1]: Entering directory '/usr/local/src/rtpbreak/src'
%
%  Compiling rtpbreak v1.3a
%
%  CC...................: cc
%  CFLAGS...............: -Wall -O3  
%  LDFLAGS..............: 
%  LIBS.................: -lpcap -lnet 
%  DEFS.................: 
%
cc -c -DVERSION=\"1.3a\" -Wall -O3    main.c
main.c: In function ‘dissect_udp’:
main.c:207:23: error: invalid application of ‘sizeof’ to incomplete type ‘struct udphdr’
   if (pktlen < sizeof(struct udphdr))
                       ^
main.c:212:25: error: invalid application of ‘sizeof’ to incomplete type ‘struct udphdr’
   len = pktlen - sizeof(struct udphdr);
                         ^
main.c:214:44: error: invalid application of ‘sizeof’ to incomplete type ‘struct udphdr’
   if (len != ntohs(pktudp->uh_ulen)-sizeof(struct udphdr))
                                            ^
main.c: In function ‘sig_stats_handler’:
main.c:1365:7: warning: variable ‘s’ set but not used [-Wunused-but-set-variable]
   int s;
       ^
Makefile:15: recipe for target 'all' failed
make[1]: *** [all] Error 1
make[1]: Leaving directory '/usr/local/src/rtpbreak/src'
Makefile:14: recipe for target 'build' failed
make: *** [build] Error 2
@ovidiusas
Copy link
Author

Adding the following include in main.c solves the problem:

#include <linux/udp.h>

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