Skip to content

Commit

Permalink
Sprinkle sources with _BSD_SOURCE as well as __FAVOR_BSD, looks
Browse files Browse the repository at this point in the history
like we need those to make us compiling on ancient linuxes, such
as Centos 7.x.

Bug report:	#83
  • Loading branch information
sobomax committed Jul 4, 2019
1 parent 4e81405 commit 3953c85
Show file tree
Hide file tree
Showing 7 changed files with 14 additions and 7 deletions.
2 changes: 1 addition & 1 deletion extractaudio/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ extractaudio_SOURCES=extractaudio.c decoder.c rtpp_loader.c ${MAINSRCDIR}/rtp.c
$(rtpp_netaddr_AUTOSRCS) eaud_oformats.c eaud_oformats.h rtpp_scan_pcap.c rtpp_scan_pcap.h \
eaud_pcap.c eaud_pcap.h eaud_substreams.c eaud_substreams.h
extractaudio_LDADD=@LIBS_G729@ @LIBS_GSM@ @LIBS_G722@ @LIBS_SNDFILE@ -lm -lpthread
extractaudio_CPPFLAGS = -I$(RTPP_AUTOSRC_DIR)
extractaudio_CPPFLAGS = -I$(RTPP_AUTOSRC_DIR) -D_BSD_SOURCE
if BUILD_CRYPTO
extractaudio_SOURCES+=eaud_crypto.c eaud_crypto.h srtp_util.c srtp_util.h
extractaudio_LDADD+=@LIBS_SRTP@
Expand Down
4 changes: 4 additions & 0 deletions extractaudio/eaud_pcap.c
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,10 @@
*
*/

#ifndef __FAVOR_BSD
#define __FAVOR_BSD
#endif /* __FAVOR_BSD */

#include <sys/types.h>
#include <sys/socket.h>
#include <netinet/in.h>
Expand Down
1 change: 1 addition & 0 deletions libexecinfo/execinfo_testfunc1.c
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
*
*/

#define _BSD_SOURCE
#include <stdlib.h>

#include "execinfo_testfunc1.h"
Expand Down
2 changes: 1 addition & 1 deletion makeann/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ extractaudio_SRCDIR=$(top_srcdir)/extractaudio
makeann_SOURCES=makeann.c rtp.h g711.h $(extractaudio_SRCDIR)/g729_compat.c \
$(extractaudio_SRCDIR)/g729_compat.h
makeann_LDADD=@LIBS_G729@ @LIBS_GSM@ @LIBS_G722@
makeann_CPPFLAGS=-I$(extractaudio_SRCDIR)
makeann_CPPFLAGS=-I$(extractaudio_SRCDIR) -D_BSD_SOURCE

makeann_debug_SOURCES = $(makeann_SOURCES) $(RTPP_MEMDEB_CORESRCS)
makeann_debug_LDADD = $(makeann_LDADD) $(RTPP_MEMDEB_LDADD)
Expand Down
3 changes: 2 additions & 1 deletion modules/acct_csv/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,12 @@ pkglib_LTLIBRARIES = rtpp_acct_csv.la rtpp_acct_csv_debug.la

rtpp_acct_csv_la_SOURCES = rtpp_acct_csv.c
rtpp_acct_csv_la_LDFLAGS = -avoid-version -module -shared -export-dynamic
rtpp_acct_csv_la_CPPFLAGS= -D_BSD_SOURCE

rtpp_acct_csv_debug_la_SOURCES = ${rtpp_acct_csv_la_SOURCES}
rtpp_acct_csv_debug_la_LIBADD = $(RTPP_MEMDEB_LDADD)
rtpp_acct_csv_debug_la_LDFLAGS=${rtpp_acct_csv_la_LDFLAGS}
rtpp_acct_csv_debug_la_CPPFLAGS=-DRTPP_DEBUG
rtpp_acct_csv_debug_la_CPPFLAGS=$(rtpp_acct_csv_la_CPPFLAGS) -DRTPP_DEBUG
rtpp_acct_csv_debug_la_CFLAGS=$(RTPP_MEMDEB_CFLAGS)

DEFS= -Wall @DEFS@
4 changes: 2 additions & 2 deletions modules/acct_rtcp_hep/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -14,14 +14,14 @@ rtpp_acct_rtcp_hep_la_SOURCES = rtpp_acct_rtcp_hep.c rtcp2json.c rtpp_sbuf.c \
rtpp_acct_rtcp_hep_la_LDFLAGS = -avoid-version -module -shared -export-dynamic
rtpp_acct_rtcp_hep_la_CPPFLAGS = -DRTPP_MODULE -Dmalloc=mod_malloc \
-Dfree=mod_free -Drealloc=mod_realloc -I$(HEPSRCDIR) -I$(UCLSRCDIR)/include
rtpp_acct_rtcp_hep_la_CFLAGS=-std=c11 -D_XOPEN_SOURCE
rtpp_acct_rtcp_hep_la_CFLAGS=-std=c11 -D_BSD_SOURCE -D_XOPEN_SOURCE
#rtpp_acct_rtcp_hep_la_LIBADD = -lz

rtpp_acct_rtcp_hep_debug_la_SOURCES = $(rtpp_acct_rtcp_hep_la_SOURCES)
rtpp_acct_rtcp_hep_debug_la_LIBADD = $(rtpp_acct_rtcp_hep_la_LIBADD) $(RTPP_MEMDEB_LDADD)
rtpp_acct_rtcp_hep_debug_la_LDFLAGS=$(rtpp_acct_rtcp_hep_la_LDFLAGS)
rtpp_acct_rtcp_hep_debug_la_CPPFLAGS=$(rtpp_acct_rtcp_hep_la_CPPFLAGS) -DRTPP_DEBUG
rtpp_acct_rtcp_hep_debug_la_CFLAGS=$(RTPP_MEMDEB_CFLAGS) -std=c11 -D_XOPEN_SOURCE
rtpp_acct_rtcp_hep_debug_la_CFLAGS=$(RTPP_MEMDEB_CFLAGS) $(rtpp_acct_rtcp_hep_la_CFLAGS)

DEFS= -Wall @DEFS@

Expand Down
5 changes: 3 additions & 2 deletions src/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,8 @@ rtpp_rzmalloc_perf_CFLAGS = $(EXTRA_CFLAGS)
rtpp_rzmalloc_perf_CPPFLAGS = $(EXTRA_CPPFLAGS)

RTPP_COMMON_CPPFLAGS=-DCFILE_PATH='"$(sysconfdir)/@[email protected]"' \
-DMDDIR_PATH='"$(libdir)/@PACKAGE@"' -I$(UCL_DIR)/include
-DMDDIR_PATH='"$(libdir)/@PACKAGE@"' -I$(UCL_DIR)/include \
-D_BSD_SOURCE
EXTRA_CFLAGS=-Werror=implicit-function-declaration -Wall

EXTRA_CPPFLAGS = -I$(RTPP_AUTOSRC_DIR)
Expand All @@ -113,7 +114,7 @@ rtpproxy_CFLAGS=$(EXTRA_CFLAGS)
rtpproxy_CPPFLAGS=$(RTPP_COMMON_CPPFLAGS) $(EXTRA_CPPFLAGS)

rtpp_objck_perf_CFLAGS=$(EXTRA_CFLAGS)
rtpp_objck_perf_CPPFLAGS=$(EXTRA_CPPFLAGS)
rtpp_objck_perf_CPPFLAGS=$(EXTRA_CPPFLAGS) -D_BSD_SOURCE
rtpp_objck_CFLAGS=$(rtpp_objck_perf_CFLAGS) $(RTPP_MEMDEB_CFLAGS)
rtpp_objck_CPPFLAGS=$(rtpp_objck_perf_CPPFLAGS) $(RTPP_MEMDEB_CPPFLAGS) -DMEMDEB_APP=rtpp_objck

Expand Down

0 comments on commit 3953c85

Please sign in to comment.