irtlab / rtptools

RTP Tools
http://www.cs.columbia.edu/irt/software/rtptools/
Other
166 stars 64 forks source link

compat: mangle names to avoid multiple definitions #138

Closed tmatth closed 2 years ago

tmatth commented 2 years ago

This was breaking the build (using cc (Ubuntu 11.2.0-19ubuntu1) 11.2.0)

tmatth commented 2 years ago

Before this change:

cc -g -W -Wall -Wmissing-prototypes -Wstrict-prototypes -Wwrite-strings -Wno-unused-parameter -c utils.c
cc -g -W -Wall -Wmissing-prototypes -Wstrict-prototypes -Wwrite-strings -Wno-unused-parameter -c payload.c
cc -g -W -Wall -Wmissing-prototypes -Wstrict-prototypes -Wwrite-strings -Wno-unused-parameter -c rd.c
cc -g -W -Wall -Wmissing-prototypes -Wstrict-prototypes -Wwrite-strings -Wno-unused-parameter -c rtpdump.c
rtpdump.c: In function ‘packet_handler’:
rtpdump.c:578:10: warning: this statement may fall through [-Wimplicit-fallthrough=]
  578 |       if (ctrl == 0) {
      |          ^
rtpdump.c:590:5: note: here
  590 |     case F_rtcp:
      |     ^~~~
cc -g -W -Wall -Wmissing-prototypes -Wstrict-prototypes -Wwrite-strings -Wno-unused-parameter -c compat-err.c
cc -g -W -Wall -Wmissing-prototypes -Wstrict-prototypes -Wwrite-strings -Wno-unused-parameter -c compat-getopt.c
cc -g -W -Wall -Wmissing-prototypes -Wstrict-prototypes -Wwrite-strings -Wno-unused-parameter -c compat-gettimeofday.c
cc -g -W -Wall -Wmissing-prototypes -Wstrict-prototypes -Wwrite-strings -Wno-unused-parameter -c compat-progname.c
cc -g -W -Wall -Wmissing-prototypes -Wstrict-prototypes -Wwrite-strings -Wno-unused-parameter -c compat-strtonum.c
cc -g -W -Wall -Wmissing-prototypes -Wstrict-prototypes -Wwrite-strings -Wno-unused-parameter -c winsocklib.c
cc -g -W -Wall -Wmissing-prototypes -Wstrict-prototypes -Wwrite-strings -Wno-unused-parameter -o rtpdump utils.o                     payload.o rd.o rtpdump.o compat-err.o compat-getopt.o compat-gettimeofday.o compat-progname.o compat-strtonum.o winsocklib.o -lnsl
/usr/bin/ld: compat-getopt.o:/big-repos/rtptools/compat-getopt.c:5: multiple definition of `dummy'; compat-err.o:/big-repos/rtptools/compat-err.c:5: first defined here
/usr/bin/ld: compat-gettimeofday.o:/big-repos/rtptools/compat-gettimeofday.c:5: multiple definition of `dummy'; compat-err.o:/big-repos/rtptools/compat-err.c:5: first defined here
collect2: error: ld returned 1 exit status
make: *** [Makefile:152: rtpdump] Error 1
mcd500 commented 2 years ago

@tmatth Merged, thanks!