1
0
Fork 0
mirror of https://github.com/ossrs/srs.git synced 2025-03-09 15:49:59 +00:00

For #307, support configure with sendmmsg.

This commit is contained in:
winlin 2020-04-05 18:34:57 +08:00
parent b23525033b
commit dc3df926eb
8 changed files with 56 additions and 15 deletions

View file

@ -189,6 +189,10 @@ OTHER_FLAGS = -Wall
ifeq ($(shell test -f /usr/include/sys/epoll.h && echo yes), yes)
DEFINES += -DMD_HAVE_EPOLL
endif
# For SRS, sendmmsg
ifeq ($(shell grep -qs sendmmsg /usr/include/sys/socket.h && echo yes), yes)
DEFINES += -DMD_HAVE_SENDMMSG -D_GNU_SOURCE
endif
endif
ifeq ($(OS), NETBSD)
@ -282,6 +286,10 @@ endif
#
# make EXTRA_CFLAGS=-UMD_HAVE_EPOLL <target>
#
# or to enable sendmmsg(2) support:
#
# make EXTRA_CFLAGS="-DMD_HAVE_SENDMMSG -D_GNU_SOURCE"
#
##########################
CFLAGS += $(DEFINES) $(OTHER_FLAGS) $(EXTRA_CFLAGS)